Created
September 15, 2016 10:39
-
-
Save Amir-P/e1140eb069b6690fb7f01794b69e6d4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func viewDidLoad() { | |
super.viewDidLoad() | |
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(_:)), name: NSNotification.Name(rawValue: "keyboardWillShow") , object: NSNotification.Name.UIKeyboardWillShow) | |
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(_:)), name: NSNotification.Name(rawValue: "keyboardWillHide"), object: NSNotification.Name.UIKeyboardWillHide) | |
hideKeyboardWhenTappedAround() | |
if let username = defaults.string(forKey: "doc_username") { | |
if let password = defaults.string(forKey: "doc_password"){ | |
login_password.text = password | |
login_username.text = username | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment