0

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:

enter image description here

After rotation to landscape and back:

enter image description here

What could possibly be causing this oddity?

Community
  • 1
  • 1
Kevin_TA
  • 4,575
  • 13
  • 48
  • 77

1 Answers1

0

So I would have never suspected it, but this issue was occurring solely because the app was not optimized for the iPhone 6 screen. Once I added Launch screen interface file base name to my info.plist, the issue went away. I hope this helps someone down the road.

Kevin_TA
  • 4,575
  • 13
  • 48
  • 77