Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm customizing a UISlider. I could set a custom thumb image that is higher than the usual thumb however I could not make the track higher when setting a higher minimum track image but the track height remained the same. It should be possible as in the iPod/Music App on the iPad the volume slider is also higher as the usual slider as you can see here:


(source: cocoia.com)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
541 views
Welcome To Ask or Share your Answers For Others

1 Answer

You need to subclass the slider and override the trackRectForBounds: method, like this:

- (CGRect)trackRectForBounds:(CGRect)bounds
{
    return bounds;
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...