This one has had me stumped all day. On an iPhone 6 running the latest iOS (8.4), the keyboard that appears for a UITextField
or UITextView
is appearing as a tiny sliver in the bottom left quadrant of the screen. As long as I keep the phone in the default portrait orientation there is never a problem. As soon as the app switches to landscape is when the keyboard starts appearing as a sliver. If I close the app and reopen, the problem goes away.
To recap:
- Open app in portrait > tap UITextView = keyboard looks normal
- Dismiss keyboard > rotate phone to landscape > rotate back to portrait > tap UITextView = keyboard is displayed as a narrow sliver
- Dismiss keyboard > close app > open app > tap UITextView = keyboard is normal again
I've implemented the callbacks for UIKeyboardWillShowNotification
and UIKeyboardWillHideNotification
following this answer, and the keyboard frame is showing the same for both occasions which is weird. I cannot reproduce this on an iPod 5 running iOS 8.0 or an iPhone 4 running iOS 7.0. Maybe it is useful to add that the app is not optimized for iPhone 6 screen size yet.
Before any rotation:
After rotation to landscape and back:
What could possibly be causing this oddity?