How to resize text (font) to fit in UISegment of UISegmentedControl?
<p>Is there any way to reduce font size that can be fit in single segment of <code>UISegmentedControl</code> ?</p>

<p>Have tried many thing something like,</p>

<pre><code>[[UILabel appearanceWhenContainedIn:[UISegmentedControl class], nil] adjustsFontSizeToFitWidth];

[[UILabel appearanceWhenContainedIn:[UISegmentedControl class], nil] setMinimumScaleFactor:0.5];
</code></pre>

<p>AND</p>

<pre><code> NSArray *arr = segment.subviews;  // segment is UISegmentedControl object

for (int i = 0; i &lt; arr.count; i++) {

    UIView *aSegment = [arr objectAtIndex:i];

    for (UILabel *label in aSegment.subviews) {

        if ([label isKindOfClass:[UILabel class]]) {

            UILabel *myLabel = (UILabel *)label;

            [myLabel setNumberOfLines:0];

            label.numberOfLines = 0;
            label.adjustsFontSizeToFitWidth = YES;
            label.minimumScaleFactor = 0.5;
        }



    }
}
</code></pre>

<p>able to set number of lines of label of segment like,</p>

<pre><code>  [[UILabel appearanceWhenContainedIn:[UISegmentedControl class], nil] setNumberOfLines:0];
</code></pre>

<p>Can set single segment size as per content like,</p>

<pre><code>  segment.apportionsSegmentWidthsByContent = YES;
</code></pre>

<p>but every segment has different size in this case.</p>

<p>I want to keep same size of every segment and want to reduce font size that can be fit in <code>UISegmentLabel (label)</code> of <code>UISegmentedControl</code> something like <code>minimumscalefactor</code> or <code>minimumfontsize</code> or <code>adjustsFontSizeToFitWidth</code>. These properties is not working for label when contains in <code>UISegmentedControl</code>.</p>

<p>If any one can help to achieve this, it will be appreciated!!</p>

<p>Thanks in advance!! </p>