开发者

Is it possible to make UISlider smaller?

开发者 https://www.devze.com 2023-02-22 23:55 出处:网络
I\'m afraid I\'m missing something obvious here, but I can\'t find an answer anywhere nor I can seem to figure it out on my own, so I\'ll ask here.

I'm afraid I'm missing something obvious here, but I can't find an answer anywhere nor I can seem to figure it out on my own, so I'll ask here.

Is it possible to make an UISlider slightly smaller than the default on开发者_StackOverflow社区e, just like the one seen in the "iPod" app on the iPhone? The height on Interface Builder seems to be frozen at 23 points.

How is it done on the iPod app? Does it use custom images?


I had an idea on how to achieve this goal. But I couldn't try it myself. So I don't know if the slider works.

Use the transformation property of every UIView subclass:

yourslider.transform = CGAffineTransformMakeScale(0.5, 0.5);

But as I said, I don't know if the slider works anymore if you apply a transformation to it.

0

精彩评论

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