title: Swift: How can I change the size of Thumb Image on UISlider based of the value of the slider?
body: <p>I haven't found an answer for this in Swift.</p>
  
  <p>I have a UISlider that changes the value of a brush size for a drawing app I'm making. I want the size of the thumb image to update depending on the value of the slider's thumb position.</p>
  
  <p>Here's a screenshot of the slider for some context:
  <img src="https://i.stack.imgur.com/eZ5Bl.jpg" alt="enter image description here"></p>
  
  <p>I set the initial image of the thumb in viewDidLoad()</p>
  
  <pre><code>self.brushSizeSlider.setThumbImage(UIImage(named: "black"), forState: UIControlState.Normal)
  </code></pre>
  
  <p>and have an IBAction for the slider as follows:</p>
  
  <pre><code>    @IBAction func brushSizeSliderChanged(sender: UISlider) {
      if sender == brushSizeSlider {
          self.brushWidth = CGFloat(sender.value)
          println("the size of the brush is: \(self.brushWidth)")
      }
  }
  </code></pre>
  
  <p>What should I add to <code>brushSizeSliderChanged</code> to change the size of it's thumb image depending on the value of brushSizeSliders thumb position / value?</p>