Created
January 25, 2020 14:54
-
-
Save BLCKBIRDS/2516b574b91dbfdd25b7022827a99752 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
@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