I know how to set up an NSNotification observer to detect when the keyboard shows/hides. From this I can get the height of the keyboard. But what happens if the device is rotated while the keyboard is still showing?
Is there a way to get the height of the keyboard in this new state? Since the keyboard is still showing a new notification will not be triggered.
You still have to use NSNotificationCenter, but you have to observe a different key. The key you're looking for is UIKeyboardDidChangeFrameNotification which according to the docs is posted immediately after a change in the keyboard’s frame.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With