Skip to content

Instantly share code, notes, and snippets.

@mekanics
Last active April 6, 2016 17:22
Show Gist options
  • Save mekanics/22a96c2731946bba543c1af405d7e654 to your computer and use it in GitHub Desktop.
Save mekanics/22a96c2731946bba543c1af405d7e654 to your computer and use it in GitHub Desktop.
func keyboardWillChangeFrame(notification: NSNotification) {
// Add this in to your code:
// NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(keyboardWillChangeFrame), name: UIKeyboardWillChangeFrameNotification, object: nil)
let keyboardFrame = notification.userInfo![UIKeyboardFrameEndUserInfoKey]!.CGRectValue
// Do something with it
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment