Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to make UISlider smaller?

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 one, 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?

like image 293
ySgPjx Avatar asked Apr 09 '11 09:04

ySgPjx


1 Answers

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.

like image 170
Sandro Meier Avatar answered Nov 09 '22 04:11

Sandro Meier