Rotating the keyboard

0 views
Skip to first unread message

Michael Koppelman

unread,
Apr 7, 2010, 11:04:50 PM4/7/10
to iphonedevmn
I'm working on an iPad game. When in two player mode, when the iPad is
laying flat on the table between the two players, I'd like to have a
button that rotates the game board so the other player can take their
turn. If I just rotate the game board view, when they click the text
input field, the keyboard still looks upside down. Do you know how to
force the keyboard into a different position? I can't seem to figure
out how to access that view directly.

The other approach I tried was to force the interfaceOrientation to
the opposite orientation but this seems to have no effect.

Any ideas?

Thanks!
M.

Paul Cantrell

unread,
Apr 9, 2010, 7:25:28 PM4/9/10
to iphon...@googlegroups.com
I know that Apple discourages this in their UI guidelines — they always want the user to initiate a rotation — and goes out of their way to discourage it in the APIs. It sounds perfectly reasonable in your case, but Apple Knows What's Good For You™ and they want to make it hard.

You might be able to mess with the transform property of the window:

[UIApplication sharedApplication].keyWindow.transform = CGAffineTransformMakeRotation(M_PI);

…or something along those lines. But that way probably lies madness.

Cheers, P

> --
> You received this message because you are subscribed to the Google Groups "iphonedevmn" group.
> To post to this group, send email to iphon...@googlegroups.com.
> To unsubscribe from this group, send email to iphonedevmn...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/iphonedevmn?hl=en.
>
>

_________________________________________________________________

“A hungry people hears no reason, nor cares for justice,
nor is bent by any prayers.” —Seneca


Dan Grigsby

unread,
Apr 9, 2010, 9:46:03 PM4/9/10
to iphon...@googlegroups.com
Hi,

I'm getting out of iPhone dev [1]. Looking to hand admin control of this list to someone. Any takers?

[1] http://www.mobileorchard.com/goodbye/

Dan

Paul Cantrell

unread,
Apr 10, 2010, 12:32:55 AM4/10/10
to iphonedevmn
Looks like I'm it. The list lives on.

Thanks, Dan, for getting the very helpful list going. It's been a
tremendous resource. We're sorry to see you leave — though your
reasons are certainly understandable.

Cheers,

Paul

Reply all
Reply to author
Forward
0 new messages