开发者

How to change the thumb of my Slider and the Bar with particular image

开发者 https://www.devze.com 2023-02-10 23:17 出处:网络
In my app i have a slider which i need to customize. I have some pictures which i want to put on bar and thumb of the slider.

In my app i have a slider which i need to customize. I have some pictures which i want to put on bar and thumb of the slider. Anyone can help me with this?

Tha开发者_如何学编程nks,


Did you look in the documentation? UISlider has several methods to change its appearance:

setMinimumTrackImage:forState:
setMaximumTrackImage:forState:
setThumbImage:forState:

If that's not enough for your needs (e.g. because one image per slider element is not enough), you'll have to subclass UISlider and probably draw the slider yourself.

0

精彩评论

暂无评论...
验证码 换一张
取 消