Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adjusting Height of Segment Control in iPhone

Tags:

iphone

I would like to know if there's any way to change the height of a Segment Control, or perhaps changing the font size of the control?

Thanks.

like image 434
Zteeth Avatar asked Dec 02 '22 07:12

Zteeth


1 Answers

You can do this only from code, not in InterfaceBuilder. IB tries to stay within Apple's HIG, that's why it does not allow to change the height.

If you change the height (frame) programmatically, you also have to change the image using setImage:forSegmentAtIndex: since the default image looks terrible when streched.

like image 75
Nikolai Ruhe Avatar answered Dec 05 '22 23:12

Nikolai Ruhe