Advertisement
Guest User

Untitled

a guest
Sep 15th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. override func viewDidLoad() {
  2. super.viewDidLoad()
  3. NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(_:)), name: NSNotification.Name(rawValue: "keyboardWillShow") , object: NSNotification.Name.UIKeyboardWillShow)
  4. NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(_:)), name: NSNotification.Name(rawValue: "keyboardWillHide"), object: NSNotification.Name.UIKeyboardWillHide)
  5. hideKeyboardWhenTappedAround()
  6. if let username = defaults.string(forKey: "doc_username") {
  7. if let password = defaults.string(forKey: "doc_password"){
  8. login_password.text = password
  9. login_username.text = username
  10. }
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement