UIPageViewController setViewControllers, UIPageControl не показывает правильный текущий номер
я использую UIPageViewController с горизонтальной прокруткой ... пока пользователь выполняет прокрутку, UIPageControl работает правильно, проблема возникает при программном переходе на следующую или предыдущую страницу
[self.pageViewController setViewControllers:@[[self viewControllerWithIndex:index]] direction:UIPageViewControllerNavigationDirectionReverse animated:YES completion:nil];
Чем не индекс UIPageControlправильно (я бы сам предоставил индекс, но не могу получить доступ к UIPageViewController 's UIPageControl)
- (NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController {
return IntroScreensCount;
}
- (NSInteger)presentationIndexForPageViewController:(UIPageViewController *)pageViewController {
return 0;
}
Как правильно получить текущий точечный индекс UIPageControl при программном изменении страницы UIPageViewController?