Assertion failure in UIPageViewController

So my solution to this was adding a BOOL which keeps track of my animations state. So before setting the new ViewController, I modify this too:

if (!_transitionInProgress) {
    _transitionInProgress = YES;
    [self.pageController setViewControllers:@[viewController] direction:UIPageViewControllerNavigationDirectionReverse animated:YES completion:^(BOOL finished) {
        _transitionInProgress = !finished;
    }];
}

So I’ll wait for my animation to finish before setting a new view controller. In my case, I have a some buttons the user can press in order to switch pages. This also prevents them from going too fast through them so the animations are always smooth and nice

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)