I have set a custom font for my UISegmentedControl, but it seems to disable the default autoAdjustFontSizeToFitWidth parameter.
Here is the code I apply to set my custom font:
UISegmentedControl *segmentedControl = (UISegmentedControl *)subview; UIFont *font = [UIFont fontWithName:DEFAULT_FONT size:DEFAULT_FONT_SIZE]; NSDictionary *attributes = [NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName]; [segmentedControl setTitleTextAttributes:attributes forState:UIControlStateNormal]; Is there a way to preserve it? Many thanks.
EDIT: I would like to avoid
segmentedControl.apportionsSegmentWidthsByContent = YES; if possible to always have same width for every segment.

