Assertion failure in UIPageViewController

后端 未结 6 591
醉梦人生
醉梦人生 2020-12-14 20:43

I have an Assertion Failure in UIPageViewController.

Assertion failure in -[UIPageViewController _flushViewController:animated:], /BuildRoot/Library/Caches/c         


        
6条回答
  •  执笔经年
    2020-12-14 21:31

    This happens when your UIPageViewControllerTransitionStyle is set to scroll instead of pageCurl.

    Are you dynamically creating View Controllers and setting them on UIPageViewController? In that case, you must ensure that the second call to setViewControllers is called after the first one completes animation because of a bug in UIKit. A delayed dispatch is a quick and dirty fix, though it is not a good practice

    More details here.

    https://forums.developer.apple.com/thread/6554

提交回复
热议问题