title: Expression resolves to an unused function
body: <p>So I have been messing around with saving and calling from NSUserDefaults and I have made progress but I keep on getting this error.</p>
  
  <p>"Expression resolves to an unused function"</p>
  
  <p>The program is supposed to save a string from a textfield so that if you close the program and open it the string will still be their. Unless, you press save again and then the string (Label) will change.</p>
  
  <p>The problem prevents me from running the program so I have not been able to test the new code that I wrote.</p>
  
  <p>Here is the source code feel free to try it.  All of this is written in swift.  </p>
  
  <pre><code>//
  //  ViewController.swift
  //  Help
  //
  //  Created by Lucas on 9/30/15.
  //  Copyright (c) 2015 Lucas. All rights reserved.
  //
  
  import UIKit
  
  class ViewController: UIViewController {
  
      @IBOutlet var Savedlbl: UILabel!
      @IBOutlet var Textfield: UITextField!
      @IBOutlet var Label: UILabel!
  
  
      var current = ""
      var Saved = ""
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
  
  
          let currentDefault = NSUserDefaults.standardUserDefaults()
  
          Savedlbl.text = currentDefault.valueForKey("saved") as? String
  
  
  
  
          // Do any additional setup after loading the view, typically from a nib.
      }
      @IBAction func Set(sender: AnyObject) {
  
  
          setall()
  
  
      }
  func setall()
      {
          current = Textfield.text!
          Label.text = Textfield.text!
          Savedlbl.text = Textfield.text!
  
  
          let currentDefault = NSUserDefaults.standardUserDefaults()
  
          Savedlbl.text = currentDefault.valueForKey("saved") as? String
           currentDefault.setValue(Saved, forKey: "saved")
              currentDefault.synchronize
              }
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  }
  </code></pre>