I have implemented UIPageViewController
in my application.
I have implemented two delegate
methods which returns view for particular Index.
And Also i am detecting forward and backward direction from these methods.
- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController
- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController
Now the problem is that sometimes viewControllerBeforeViewController
and viewControllerAfterViewController
are not called but Pagination works fine. Due to this i am not able to find Direction.
Also I have implemented Custom Page Control and I am finding current Index from these methods. When These method not called my PageControl is now working find.
I am not able to find any solution for this.
Some how I manage to find the Index in this delegate method.
Whenever I am returning
ViewController
forPageController
I am setting itsIndex
value in respective view controller and Finding thisIndex
as: