Customizing UISlider look

前端 未结 7 584
萌比男神i
萌比男神i 2020-12-10 14:30

To customize the visual look of a UISlider you can set the thumb and track images. Part of the track images gets stretched to the appropriate with. From the documentation:

7条回答
  •  孤街浪徒
    2020-12-10 15:11

    I wanted a pattern behind my UISlider. I ended up setting both images to nil and adding a view under the slider since I didn't need it to be different on either side of the thumb. This would be more difficult if you needed to change it based on the position, but quite doable.

提交回复
热议问题