Hi: I've been using the following code to control orientation specific to each card (some are landscape and some are portrait, but none are both/either)
if the environment is "mobile" then
put "portrait,portrait upside down" into theallowed
iphoneSetAllowedOrientations theallowed
end if
And it does work, but when as soon as you navigate to the page. the page stays the same orientation until the iphone is turned - then the new orientation rules become effective and it stays that way.
Is there a better way to force the orientation?
orientation control
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 349
- Joined: Tue Oct 28, 2008 1:23 am
- Contact:
Re: orientation control
Rather than waiting for the orientation to change, you should be able to force a specific orientation by using iphoneLockOrientation in an openCard (or a preOpenCard) handler. You should then be able to unlock to allow the orientation to change within the confines of your allowed orientations.