title: UISwitch has an outline when changing the background color
body: <p>I've defined a switch as below:</p>
  <pre><code>self.toggleSwitch.onTintColor = UIColor.redColor;
  self.toggleSwitch.backgroundColor = UIColor.yellowColor;
  self.toggleSwitch.layer.cornerRadius = self.toggleSwitch.frame.size.height / 2;
  self.toggleSwitch.clipsToBounds = YES;
  </code></pre>
  <p>This is the result I'm getting: <a href="https://i.stack.imgur.com/SYUc8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SYUc8.png" alt="Switch OFF" /></a> <a href="https://i.stack.imgur.com/osOhr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/osOhr.png" alt="Switch ON" /></a></p>
  <p>As can be seen in the images, there is an outline of the yellow background.
  How this can be solved?</p>