Page indication is missing in UIPageViewController

Houman picture Houman · Jan 23, 2014 · Viewed 13k times · Source

I would like to utilise UIPageViewController to paginate through my datasource. Essentially it works, however I don't get to see the dots as an indication on which page I am.

Someone has asked this question before and I have done exactly what the answer suggested. However I still don't get any dots on the bottom of my screen.

Essentially I am using UIPageViewControllerTransitionStyleScroll and navigation orientation is UIPageViewControllerNavigationOrientationHorizontal.

I have created a sample project on GitHub to demonstrate the problem.

If anyone would be so kind and help out.

Answer

Senseful picture Senseful · May 30, 2014

Another way to fix this issue is to customize the page control's tint colors:

UIPageControl *pageControlAppearance = [UIPageControl appearanceWhenContainedIn:[UIPageViewController class], nil];
pageControlAppearance.pageIndicatorTintColor = [UIColor lightGrayColor];
pageControlAppearance.currentPageIndicatorTintColor = [UIColor darkGrayColor];