1
votes

my UIPageViewController class conforms to UIPageViewControllerDataSource protocol and yet UIPageControl is not visible.

I've attached screen representing segues between UIPageViewController and it's child UIViewController's which are added by setViewControllers method.

enter image description here

Question is why Page Control is not shown and what can i do with it except adding UIPageControl instance to view myself ?

2

2 Answers

1
votes

For some reason, it seems as though UIPageControl only appears when the Transition Style is set to "Scroll" -- very frustrating! (Hope I'm wrong?) Click on your UIPageViewController ('Home Page View Controller'?) to see the option under Page View Controller.

0
votes

Make sure you've implemented the optional -presentationCountForPageViewController: and -presentationIndexForPageViewController: data source methods.

UIPageViewController.h is very clear about the requirements:

A page indicator will be visible if both methods are implemented, transition style is 'UIPageViewControllerTransitionStyleScroll', and navigation orientation is 'UIPageViewControllerNavigationOrientationHorizontal'.