title: UISwitch in iOS 7 showing a border
body: <p>I have a UISwitch whose functionality is working fine. I have 2 images of size 77 x 27 pixels and applying them for ON and OFF images.</p>
  
  <p>But, its showing a stretched border in IOS 7 as seen in the images below:</p>
  
  <p><img src="https://i.stack.imgur.com/7vn0n.png" alt="Image showing a stretched border"> <strong>Image showing a stretched border, Background colour is white</strong></p>
  
  <p><img src="https://i.stack.imgur.com/5AAeO.png" alt="Image showing fine"> <strong>Image showing fine, Background colour is black</strong></p>
  
  <p>I have tried the following code :</p>
  
  <pre><code>_switcherTheme = [[UISwitch alloc] initWithFrame:switchRect];
  _switcherTheme.backgroundColor = [UIColor colorWithRed:36.0/255.0 green:41.0/255.0 blue:45.0/255.0 alpha:1.0];
  _switcherTheme.layer.cornerRadius = 16.0;
  [_switcherTheme setOnTintColor:[UIColor colorWithRed:223.0/255.0 green:245.0/255.0 blue:241.0/255.0 alpha:1.0]];
  if ([[[UIDevice currentDevice] systemVersion] floatValue] &lt; 7.0) {
      [_switcherTheme setOnImage:[UIImage imageNamed:@"color_light.png"]];
      [_switcherTheme setOffImage:[UIImage imageNamed:@"color.png"]];
  }
  </code></pre>
  
  <p>My question is : How to make this border correct for 1st image ?</p>