When I programmatically turn the page in a UIPageViewController using a method similar to this answer, the Page Indicators are not updated. Swiping to the next/previous page updates the page indicators as expected. What do I need to do to update the Page Indicators when programmatically turning the page? i.e. How do I set the current "index" after programmatically changing the page so the Page Indicators know which page indicator to show as active?
I noticed in the documentation, the following is stated:
If both of the methods in “Supporting a Page Indicator” are implemented and the page view controller’s transition style is UIPageViewControllerTransitionStyleScroll, a page indicator is visible. Both of these methods are called after the setViewControllers:direction:animated:completion: method is called. After gesture-driven navigation, these methods are not called. The index is updated automatically and the number of view controllers is expected to remain constant.
(see bold text above)
UIPageViewController documenatation
Does this imply that if you don't use a gesture to turn the page, then there is no way to update the UIPageIndicators?
Thanks in advance for your help.