Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 964
Christian Gossain Avatar asked Nov 11 '10 20:11

Christian Gossain


3 Answers

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];
like image 100
Avario Avatar answered Nov 02 '22 23:11

Avario


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

like image 29
Justin Avatar answered Nov 02 '22 21:11

Justin


From Story Board :-

select clear color for Min Track and Max Track

enter image description here

like image 1
Bijender Singh Shekhawat Avatar answered Nov 02 '22 21:11

Bijender Singh Shekhawat