import UIKit
class ViewController: UIViewController {
@IBOutlet weak var Name: UITextField!
let saveName = NSUserDefaults.standardUserDefaults()
@IBAction func HideKeyboardName(sender: UITextField) {
saveName.setObject(Name.text, forKey: "Name")
}
override func viewDidLoad() {
super.viewDidLoad()
if let text = saveName.stringForKey("Name") {
Name.text = text
}
}
}