Skip to content

Instantly share code, notes, and snippets.

@BLCKBIRDS
Created January 25, 2020 14:54
Show Gist options
  • Save BLCKBIRDS/2516b574b91dbfdd25b7022827a99752 to your computer and use it in GitHub Desktop.
Save BLCKBIRDS/2516b574b91dbfdd25b7022827a99752 to your computer and use it in GitHub Desktop.
@objc func keyBoardWillShow(notification: Notification) {
if let keyboardSize = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue {
withAnimation {
currentHeight = keyboardSize.height
}
}
}
@objc func keyBoardWillHide(notification: Notification) {
withAnimation {
currentHeight = 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment