开发者

Custon UISlider with non rectangular area

开发者 https://www.devze.com 2022-12-14 04:10 出处:网络
I would like to customize my UISlider like this screenshot : alt text http://img3.imageshack.us/img3/7707/sliderp.png

I would like to customize my UISlider like this screenshot :

alt text http://img3.imageshack.us/img3/7707/sliderp.png

I'm using setMinimumTrackImage and setMaximumTrackImage method with a non strechable image but it doesn't work.

The image is stre开发者_Go百科tched and proportion are kept.

Any idea ?

Thanks.

Thierry


You might try setting invisible images for both minimumTrackImage and maximumTrackImage to transparent, and then sticking a UIImageView behind it.


You need to change the frame size of your slider, all your are changing are the values

UISlider *customSlider = [[UISlider alloc] initWithFrame:CGRectMake(X,Y,Width,Heigth)];

I hope this helps

0

精彩评论

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