iOS: change the height of UISegmentedcontrol iOS: change the height of UISegmentedcontrol ios ios

iOS: change the height of UISegmentedcontrol


Adding a constraint in IB will also do the trick:

Constraint in IB


Yes, you can use [mySegmentedControl setFrame:frame] in code. It is unfortunate that you can't do this in IB.

So, if you just want to change the height:

CGRect frame= mySegmentedControl.frame;[mySegmentedControl setFrame:CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, fNewHeight)];


Add a new height constraint and set its value.

enter image description here