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
Easy One :
[_slider setThumbImage:[UIImage new] forState:UIControlStateNormal];
精彩评论