Custom UISegmentedControl

后端 未结 10 2102
我寻月下人不归
我寻月下人不归 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:59

    In order to do this you must listen for the UIControlEventValueChanged and change the image yourself. You shouldn't need to subclass the UISegmentedControl - remember composition over inheritance is preferred!

提交回复
热议问题