I use the UIPageViewController with horizontal scrolling ... while the user scrolls, the UIPageControl is working correctly, there is a problem when programming programmatically on the next or previous page
[self.pageViewController setViewControllers:@[[self viewControllerWithIndex:index]] direction:UIPageViewControllerNavigationDirectionReverse animated:YES completion:nil];
Than the UIPageControl index is wrong (I would have provided the index myself, but could not access the UIPageViewController UIPageControl)
- (NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController { return IntroScreensCount; } - (NSInteger)presentationIndexForPageViewController:(UIPageViewController *)pageViewController { return 0; }
How to get the current UIPageControl access point index when changing the UIPageViewController page programmatically?
ios cocoa-touch uipageviewcontroller uipagecontrol
Peter Lapisu
source share