The controller adds a UISegmentedControl to the navigation bar. Segmented control is added to the navigation bar in the controller's viewDidLoad method, but the actual segments are created dynamically after calling viewDidLoad .
I cannot automatically resize segments when displaying a view. They all flatten out, as in this message , although the resolution does not apply here. If segments are added before the segmented control is added to the right element of the navigation panel (disrupting the dynamic nature of the code), they automatically change and look great when the view is displayed.
Here is a stripped down version of my code below. What am I missing?
@implementation MyController - (void)viewDidLoad {
source share