title: UISwitch set on/off Image
body: <p>I want to set my Switch like this:</p>
  
  <p><a href="https://i.stack.imgur.com/J7uJ5.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/J7uJ5.jpg" alt="enter image description here"></a></p>
  
  <p>But I try in ios9 , it does not work.
  I saw in apple UISwitch Class Reference.
  It says that :</p>
  
  <p>Discussion
  In iOS 7, this property has no effect.</p>
  
  <p>How about iOS 9? Any one success?</p>
  
  <p>My Code:</p>
  
  <pre><code>switch1 = UISwitch(frame:CGRectMake(self.view.frame.width/2 - 20, 400, 10, 100))
  switch1.on = true
  switch1.onTintColor = UIColor.lightGrayColor()
  switch1.tintColor = UIColor.greenColor()
  switch1.thumbTintColor = UIColor.blackColor()
  </code></pre>
  
  <p>//set on/off image</p>
  
  <pre><code>switch1.onImage = UIImage(named: "on-switch")
  switch1.offImage = UIImage(named: "off-switch")
  </code></pre>