title: How to change the corner radius of UISegmentedControl?
body: <p>Is it possible to change the corner radius of UISegmentedControl? I have tried the following approach which we use to change a UIView's corner radius.</p>
  <pre><code>self.segmentedControl.layer.cornerRadius = 15.0;
  self.segmentedControl.layer.masksToBounds = YES;
  </code></pre>
  <p>This did not work as you can see it only cuts off the UISegmentedControl's corner:</p>
  <p><img src="https://i.stack.imgur.com/VHc2V.png" alt="cut off corner" /></p>