Page 1 of 1

orientation control

Posted: Sat Apr 30, 2011 10:25 pm
by adventuresofgreg
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?

Re: orientation control

Posted: Fri May 06, 2011 9:17 pm
by CALL-151
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.