Assertion failure in UIQueuingScrollView didScrollWithAnimation:force:

后端 未结 5 1285
情深已故
情深已故 2021-01-31 03:17

I\'ve got a UIPageViewController set up paging my ImageViewController.

The ImageViewController contains a UIScrollView

5条回答
  •  有刺的猬
    2021-01-31 03:56

    I have been fighting with this all day. My Conclusions:

    If you have a scrollview as the showing ViewController and you are delegate of the scrolls: you're in trouble. Even with the PageViewController configured with Horizontal scrolling, a vertical scrolling on your view will trigger an event. -> this does not cause trouble if: you scroll back to the top of your view before (Not sure how to fix this).

    There are good StackOverflow threads like this one.

    Basically the solution is:

    1 [yourView setViewControllers:yourControllers direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];

    2 Use UIPageViewControllerTransitionStylePageCurl as the transition Style.

    This fixed most of my problems.

    If someone has a solution for the delegation problems with the scrolling, will be most wellcome

提交回复
热议问题