Search code examples
xcodeuipageviewcontroller

Xcode how to make more dots in a page controller


I have a page view controller with 10 pages, the sliding effect works perfect. But I have only 3 dots at the bottom so that every user thinks there are only 3 pages to slide. How can change the page controller to see more dots?


Solution

  • UIPageControl *pc = [[UIPageControl alloc] init];
    [pc setNumberOfPages:100];//this line is responsible for number of dots
    [self.view addSubview:pc];