Page 1 of 1

Mobile Orientation

Posted: Wed Mar 30, 2016 8:43 pm
by Jamie37
Hello,

I have used this code from this website: http://runrev.screenstepslive.com/s/352 ... ientations

Basically the problem I am having is I want the orientation to change to 'Landscrape Left' automatically when I enter one substack which is does fine. The problem is that it does not return to portrait on the other stacks. I have the code set on portrait but it does not seem to be doing anything. Can anyone help me please?

Thanks
Jamie

Re: Mobile Orientation

Posted: Mon Apr 04, 2016 4:01 pm
by newtronsols
why not just allow the user to choose:

if the environment is "mobile" then

--Portrait , Portrait Upside Down , Landscape Left, Landscape Right are the 4 Parameters to be passed in the function iphoneSetAllowedOrientations

put "portrait,portrait upside down,landscape left,landscape right" into theallowed

-- Function Call

mobileSetAllowedOrientations theallowed

end if

Re: Mobile Orientation

Posted: Mon Apr 04, 2016 5:01 pm
by Jamie37
Hi newtronsois,

I need the orientation to be forced to landscape for only one substack but the rest of the app needs to be natively in portrait. Is this possible?

Jamie

Re: Mobile Orientation

Posted: Wed Apr 13, 2016 11:18 am
by MaxV
With mobileSetAllowedOrientations the setting take affect the next time an orientation change is applied. The interface orientation only changes if the new orientation is among the configured list.
I sugget you to use the mobileLockOrientation command to temporarily prevent orientation changes.