Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement