Orientations
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Orientations
Hello. the main stack of my app is portrait. and i have one substack and i want it to be landscape when opening a substack from app. can someone tell me how to do this?
Re: Orientations
Hi kararak95,
I've been trying but it hasn't been reliable.
look-up mobileSetAllowedOrientations and orientationChanged. Using those two I could get it to sort of work but doubt you'd want to make a product with it.
Simon
I've been trying but it hasn't been reliable.
look-up mobileSetAllowedOrientations and orientationChanged. Using those two I could get it to sort of work but doubt you'd want to make a product with it.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 192
- Joined: Tue Mar 11, 2014 12:57 pm
Re: Orientations
If you create a button 'test' , then stack script
on preOpenStack
mobileSetAllowedOrientations "landscape left,portrait,landscape right,portrait upside down"
end preOpenStack
and for the card script:
on orientationChanged
local theOrientation
put mobileDeviceOrientation() into theOrientation
set the label of button "test" to theOrientation
end orientationChanged
You should see the label of a button 'test' change to the orientation selected as you move your phone through 90 degrees.
You can also force the initial orientation in the standalone settings to landscape. So you start landscape.
on preOpenStack
mobileSetAllowedOrientations "landscape left,portrait,landscape right,portrait upside down"
end preOpenStack
and for the card script:
on orientationChanged
local theOrientation
put mobileDeviceOrientation() into theOrientation
set the label of button "test" to theOrientation
end orientationChanged
You should see the label of a button 'test' change to the orientation selected as you move your phone through 90 degrees.
You can also force the initial orientation in the standalone settings to landscape. So you start landscape.