Closed JaxGit closed 9 years ago
Inspired from http://stackoverflow.com/questions/25740245/assertion-failure-in-uipageviewcontroller I've create a pull request to disable pageControl while there is a gesture-initiated transition animation going.
Confirmed. I'll take your PR for this issue Thank u!
In THSegmentedPagerExample,
Failure type 1:
Given the user has switched to last page (like Page 3) and the transition animation has completed, and user has dragged the scrollView leftwards to some extent and revealed the background color, and user has stopped dragging (touch up) and the bailed out transition (to conceal the background color) animation has started;
When user quickly start switching to another page by tapping pageControl (like Page 1) before the bailed out animation ends;
Then the following assertion failure shows and the app crashes: * Assertion failure in -[UIPageViewController queuingScrollView:didEndManualScroll:toRevealView:direction:animated:didFinish:didComplete:], /SourceCache/UIKit_Sim/UIKit-2935.137/UIPageViewController.m:1866 * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No view controller managing visible view ...'
Failure type 2:
Given the user has switched to a page (like Page 1) and the transition animation has completed, and user has dragged the scrollView leftwards a little bit and revealing the adjacent page (like Page 2), and user has stopped dragging (touch up) and the bailed out transition (to conceal the adjacent page) animation has started;
When user quickly start switching to another page by tapping pageControl (like Page 2) before the bailed out animation ends;
Then the following assertion failure shows and the app crashes: * Assertion failure in -[_UIQueuingScrollView _enqueueCompletionState:], /SourceCache/UIKit_Sim/UIKit-2935.137/_UIQueuingScrollView.m:499 * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Duplicate states in queue'