title: How to access a slider's value outside of it's function in Swift?
body: <p>I'm sure it's simple but I'm not getting it, this function works fine to display the slider's value (sales price), however I need to access it again in the button method below but can't pass the salesPrice value in? </p>
  
  <pre><code>class FirstViewController: UIViewController {
  
  
  
  
  var salesPrice: Int?
  
  
  
  
  
  
  @IBOutlet weak var salesPriceLabel: UILabel!
  
  
  @IBAction func salesPriceSlider(sender: UISlider) {
      salesPrice = roundUp(Int(sender.value), divisor: 1000)
      salesPriceLabel.text = "\(salesPrice!)"
  }
  
  
  
  
  @IBAction func testButton(sender: UIButton) {
  
                  totalClosingCosts.text = "\(salesPrice!)"
  </code></pre>
  
  <p>returns nil</p>