These two methods viewControllerBeforeViewController and viewControllerAfterViewController of the UIPageViewControllerDataSource don\'
There is no way to determine whether the user swiped forward or backward.
You need to use these two methods to provide the views before and after:
pageViewController:viewControllerBeforeViewController:
pageViewController:viewControllerAfterViewController:
You can keep track of an index by adding a property to the viewControllers and then you can compare the pageIndexes.