Himanshu Himanshu - 2 years ago 108
Swift Question

Adding dots to bottom of UIPageViewController screen

I have implemented the data source methods of UIPageViewController and still not getting dots at bottom of my iOS app. Anybody have any solution to make dots appear on my app?

Answer Source

When you are using UIPageViewController your dots should be visible by default. I guess you have white background and since the dots are white as well you just simply don't see them. Try to change dots color:

var pageControlAppearance  = UIPageControl.appearanceWhenContainedIn(UIPageViewController.self, nil)
pageControlAppearance.pageIndicatorTintColor = UIColor.redColor()
pageControlAppearance.currentPageIndicatorTintColor = UIColor.redColor()

If that doesn't help, please make sure that you are using UIPageViewControllerTransitionStyleScroll transition style.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download