Search code examples
iphoneiosuipagecontrol

What's the best way of handling a UIPageControl that has so many dots they don't all fit on the screen


I have a UIPageControl in my application that looks perfectly fine with around 10 pages (dots), it's possible however for the user to add many different views, and so the number of dots could become say 30.

When this happens the dots just disappear off the edge of the screen, and you can't always see the currently selected page, making it all look terrible.

Is there any way to make the pagecontrol multi-line, or to shift it left or right at the moment the currently visible page disappears of the screen.


Solution

  • I created an eBook application that used UIScrollView that contained a UIWebView. The book had over 100 pages so UIPageControl could not handle it because of the problem you pointed out. I ended up creating a custom "slider" type view that acted similar to UIPageControl but could handle the large number of pages. That's pretty much what you will need to do. UIPage control cannot handle as many pages as you want...