I'am using a UIPageViewController with horizontal scrolling... as long as the user scrolls, the UIPageControl works correctly, problem occurs when jumping programmatically to next or previous page
[self.pageViewController setViewControllers:@[[self viewControllerWithIndex:index]] direction:UIPageViewControllerNavigationDirectionReverse animated:YES completion:nil];
Than the index of the UIPageControl isn't right (i would provide the index by myself, but cannot access the UIPageViewController's UIPageControl)
- (NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController {
return IntroScreensCount;
}
- (NSInteger)presentationIndexForPageViewController:(UIPageViewController *)pageViewController {
return 0;
}
How to get the current dot index of the UIPageControl right, when changing the UIPageViewController page programmatically?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…