podkovyrin / Keyboardy

UIViewController extension for convenient keyboard management.
MIT License
113 stars 11 forks source link

iOS 11 - Keyboard Height returns 0 #7

Closed mkhoshpour closed 6 years ago

mkhoshpour commented 6 years ago

Hi I figured out that in when I run the code in XCode 9 and ios 11, when keyboard comes up this function returns height 0: func keyboardTransitionAnimation(_ state: KeyboardState) { } so I searched and found that in Keyboardy.swift in line 115 you must change let rect = (userInfo[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue, to let rect = (userInfo[UIKeyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue, thanks to https://stackoverflow.com/questions/45689664/ios-11-keyboard-height-is-returning-0-in-keyboard-notification

mkhoshpour commented 6 years ago

this is fixed in version 0.2.1