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

后端 未结 5 1297
夕颜
夕颜 2021-02-08 22:51

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 numbe

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-08 23:15

    Calculate the pages/dot ratio and store as float value. Then calculate current dot number as current page/pagesPerDot. You may need to advance a few pages before seeing the dot move, but it's very scalable and works well.

提交回复
热议问题