Fix keyboard orientation in landscape iPad app (upside down keyboard)

Posted by hjd on Stack Overflow See other posts from Stack Overflow or by hjd
Published on 2010-05-10T13:31:20Z Indexed on 2010/05/10 13:34 UTC
Read the original article Hit count: 1059

I'm converting a landscape (UIInterfaceOrientationLandscapeRight) iPhone app to be a universal app. So far I've got the orientation working properly: the iPad version will launch with the right splash graphic and start in the right orientation (LandscapeLeft or LandscapeRight) depending on how the user is holding it.

But: when I trigger the keyboard while the iPad is in LandscapeLeft, the keyboard appears upside down:

I can't post images yet so you can see the error here: http://blog.durdle.com/images/ipad_keyboard.png

That's a UIAlertView with a UITextField added to it. I guess the keyboard at this point is in the LandscapeRight orientation.

If I rotate the device to LandscapeRight, the game view rotates to match the keyboard, then if I rotate the device back to LandscapeLeft the entire interface - game AND keyboard rotate together to appear correctly.

So: how do I ensure it appears in the correct orientation?

© Stack Overflow or respective owner

Related posts about iphone-sdk-3.2

Related posts about ipad