Custom UIPageControl view, replacing dots with “Page X of Y”

前端 未结 6 486
名媛妹妹
名媛妹妹 2021-01-30 09:33

I\'m trying to find a way to replace the dots of a UIPageControl with a caption that reads \"Page X of Y\" since I\'ll likely have >50 items. I\'m just becoming familiar with Co

6条回答
  •  轮回少年
    2021-01-30 10:36

    Just use a UILabel and set its text w/ a format string in your scroll delegate that says "Page N of K" or somesuch. Invisible left/right buttons can be added with simple transparent UIButtons.

    Up to you if you really want to write the UIControl subclass yourself....

提交回复
热议问题