I am using the code below:
CGRect keyboardFrame = [[userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
but it doesn't work exactly.
I am using the code below:
CGRect keyboardFrame = [[userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
but it doesn't work exactly.
You can subscribe to notifications: UIKeyboardWillChangeFrame or UIKeyboardDidChangeFrame . In handlers you can get the end frame of the keyboard.
Here I’ve created an example application.
When switching to emoji keyboard by pressing the language selector button (the globe), it seems that a UIKeyboardWillChangeFrame
-notification gets sent. But when changing by long pressing the language selector button, no notification is sent.
It looks to me as a bug in iOS 11, since even the apple messages app and facebook messenger app doesn't handle this right. I've submitted a radar about this with id: 36657137