Setting width of UISegmentedControl after removing a segment
- by David Foster
I have a UISegmentedControl of width 280. In code, I need to remove the third segment, set the UISegmentedControl's width to 200 and then re-centralise.
By configuring the springs and struts in IB, I have set the segmented control up such that when I set the width directly it will automatically re-centre.
However, when setting the width in code,…