Custom UISegmentedControl

后端 未结 10 2023
我寻月下人不归
我寻月下人不归 2020-12-04 10:23

How do I make a custom UISegmentedControl?

I have 2 images, 1 that should be displayed when the segment is active and the other if the segment is inacti

10条回答
  •  有刺的猬
    2020-12-04 10:40

    Yes, you you DO need 2 images (on and off) for each section of the segment bar. (4 segments... 8 images.) But it lets you set a total of 16 choices! (All with only consuming 1 row in your GUI.)

    I got everything working EXCEPT... how do you hide the original segment bar graphics?

    Can't set alpha to 0. (It will also hide your images.)

    Can't set "tintClear" to "clear". (Not sure why it makes it black and white.)

    Can't set it to "hidden"... nothing will work at all.

    Can't set "background" to "clear". (The background is NOT the segmentbar graphics.)

提交回复
热议问题