I have an app that uses the built-in flip animation to switch between the various views. Everything works, except when I’m flipping back to a view that was a scroll view and it was NOT on the first page. Meaning:
- My scroll view has three pages
- User swipes to the third page
- User taps the button on the third page to proceed to the next view
- when user tries to return to the scroll view the flip animation shows the first page during the flip and then snaps to the correct page after the flip is done.
I’m using [scrollView setContentOffset] to the set the correct page BEFORE the flip animation but that doesn’t seem to be enough. Is there a way to do this?
Use
You want to suppress animations, since you are performing an animation yourself. You also want to be sure that you set the content offset BEFORE you begin specifying the flip animation, since the animation transforms everything from the current state to whatever new values you provide in the animation block.
Calling it in
viewDidLoadorviewWillAppear:should work.