Disable UIPageViewController bounce

Disable UIPageViewController’s bounce Add the <UIScrollViewDelegate> delegate to your UIPageViewController’s header Set the UIPageViewController’s underlying UIScrollView’s delegates to their parent in viewDidLoad: for (UIView *view in self.view.subviews) { if ([view isKindOfClass:[UIScrollView class]]) { ((UIScrollView *)view).delegate = self; break; } } The implementation for scrollViewDidScroll is to reset the contentOffset to the origin (NOT (0,0), but … Read more

UIPageViewController, how do I correctly jump to a specific page without messing up the order specified by the data source?

Programming iOS6, by Matt Neuburg documents this exact problem, and I actually found that his solution feels a little better than the currently accepted answer. That solution, which works great, has a negative side effect of animating to the image before/after, and then jarringly replacing that page with the desired page. I felt like that … Read more

How do I Disable the swipe gesture of UIPageViewController?

The documented way to prevent the UIPageViewController from scrolling is to not assign the dataSource property. If you assign the data source it will move into ‘gesture-based’ navigation mode which is what you’re trying to prevent. Without a data source you manually provide view controllers when you want to with setViewControllers:direction:animated:completion method and it will … Read more

Is it possible to Turn page programmatically in UIPageViewController?

Yes it is possible with the method: – (void)setViewControllers:(NSArray *)viewControllers direction:(UIPageViewControllerNavigationDirection)direction animated:(BOOL)animated completion:(void (^)(BOOL finished))completion;` That is the same method used for setting up the first view controller on the page. Similar, you can use it to go to other pages. Wonder why viewControllers is an array, and not a single view controller? That’s because … Read more

UIPageViewController: return the current visible view

You should manually keep track of the current page. The delegate method pageViewController:didFinishAnimating:previousViewControllers:transitionCompleted: will tell you when to update that variable. The last argument of the method transitionCompleted: can tell you whether a user completed a page turn transition or not. Then, you can get the currently presented View Controller by doing self.viewControllers?.first