title: UISegmentedControl image scaling
body: <p>How can I scale down the images used in a <code>UISegmentedControl</code>? I am creating the segmented control programmatically:</p>
  
  <pre><code>UISegmentedControl * segmentButton;
  segmentButton = [UISegmentedControl segmentedControlWithItems:
                   [NSArray arrayWithObjects:
                    [UIImage imageNamed:@"option_one.png"],
                    [UIImage imageNamed:@"option_two.png"],
                    nil]];
  segmentButton.contentMode = UIViewContentModeScaleToFill;
  segmentButton.frame = CGRectMake(10, 10, 200, 32);
  [view addSubview:segmentButton];
  </code></pre>
  
  <p>The result is not what I expect. The original .png images are about 100 pixels high, and they are <em>not</em> scaled down to fit the 32-pixel height of the segmented control. This results in a segmented control being drawn with enormous images overlapping it:</p>
  
  <p><img src="https://i.stack.imgur.com/Xe26y.jpg" alt="screen shot"></p>
  
  <p>How can I tell the control to scale down those images?</p>