title: How to disable UISlider?
body: <p>I've seen answers about this but no actual code explaining how to, I'm new to swift so really confused on how to perform this simple task.</p>
  <p>I have a <code>UISlider</code> However I want to disable the sliders function when an <code>if</code> statement is true.</p>
  <p>I current have a UISlider with an <code>if</code> statement but can't workout how to disable it.</p>
  <pre><code>@IBAction func radiusSlider(sender: UISlider) {
      if location == false {
          //Disable Slider
      } else {
          radiusData.radiusValue = Double(sender.value)
          radiusLabel.text = &quot;Radius: \(sender.value)km&quot;
          NSNotificationCenter.defaultCenter().postNotificationName(radiusValue, object: self)
      }
  }
  </code></pre>
  <p>Or would this be in within the viewDidLoad? If so how?</p>