I have a QuizViewController which extends UIViewController, UIPageControllerDelegate, and a UIPageView
You can use this function:
func movePageToIndex(pageIndex NSInteger)->() {
var viewControllers = []
var direction : UIPageViewControllerNavigationDirection!
if (pageIndex < currentIndex) {
direction = UIPageViewControllerNavigationDirection.Reverse
} else {
direction = UIPageViewControllerNavigationDirection.Forward
}
viewControllers = @[[self.getItemController(pageIndex)]]
WEAKSELF weakSelf = self;
self.pageViewController.setViewControllers:viewControllers direction:direction animated:false completion:nil];
}