PaperFold-for-iOS icon indicating copy to clipboard operation
PaperFold-for-iOS copied to clipboard

Fold animation not working for the first tim after setPaperFoldState:animated: if animated is NO

Open MihaiDamian opened this issue 10 years ago • 1 comments

Steps to reproduce:

  1. Open the PaperFold project
  2. Insert this line in init after the views are setup: [_paperFoldView setPaperFoldState:PaperFoldStateLeftUnfolded animated:NO];
  3. Run the app and observe the left view. It is unfolded, as expected.
  4. Swipe left to fold the left view
  5. Instead of the left view folding it is simply covered by the center view

If you unfold the left view again and fold it it will work, but the first time it doesn't. This bug only happens if the state is set with animations turned off.

MihaiDamian avatar Jul 08 '14 07:07 MihaiDamian

One workaround is to call foldWillOpen on the fold view that is unfolded by setPaperFoldState:animated:. Something like this: [_paperFoldView.leftFoldView foldWillOpen]; This seems to initialize some internal state in the MultiFoldView that seems to be missed by calling setPaperFoldState:animated:

MihaiDamian avatar Jul 08 '14 08:07 MihaiDamian