I have an UIPageViewController
and a class which conforms to UIPageViewControllerDataSource
and manages the UIViewControllers which UIPageViewController displays. It all runs well when turning the pages is initiated by the user. But now I want to do that programmatically.
I've found that there is a very similar question here on SO which answers the question for a static amount of ViewControllers: Is it possible to Turn page programmatically in UIPageViewController?
But I'm unable to adapt the answers to the use of UIPageViewControllerDataSource. I was thinking that there must be something like:
- (void)setCurrentViewController:(UIViewController *)viewController
I suppose I'm just overlooking something here.