开发者

How can I hide the UISlider track?

I've created a slider track that is draw on the actual开发者_运维知识库 background of my app and I've also drawn the UISlider thumb image. I know how to set the thumb image for the slider. But how do I hide the UISlider track?


If you do not want to use transparent images, you can just set the track images to empty UIImage objects:

[slider setMinimumTrackImage:[UIImage alloc] forState:UIControlStateNormal];
[slider setMaximumTrackImage:[UIImage alloc] forState:UIControlStateNormal];


Use a 1px transparent image for the min and max track images. I answered this very same question yesterday.


From Story Board :-

select clear color for Min Track and Max Track

How can I hide the UISlider track?


Easy One :

[_slider setThumbImage:[UIImage new] forState:UIControlStateNormal];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜