auto-rotation in 5.0.1/.02
Mark Smith
Mark_Smith at cpe.umanitoba.ca
Sat Nov 26 17:17:23 EST 2011
Further to this I just wanted to add the following:
"To configure which orientations your application supports use:
iphoneSetAllowedOrientations orientations
Here orientations must be a comma-delimited list consisting of at least one
of portrait, portrait
upside down, landscape left and landscape right. The setting will take
effect the next time an
orientation change is effected – the interface's orientation will only be
changed if the new
orientation is among the configured list. You can query the currently
allowed orientations with the
iphoneAllowedOrientations() function."
I added the following code to my stack script:
on preOpenStack
if the environment is "mobile" then
iphoneSetAllowedOrientations "portrait, portrait upside down,
landscape left, landscape right"
end if
end preOpenStack
global ncnt
on orientationchanged
global ncnt
put ncnt + 1 into ncnt
put ncnt & " " & iphoneallowedorientations() into fld "Selected" on card
"home"
end orientationchanged
Now, each time I rotate the iphone ncnt is incrementing (1,2,3... etc) but I
only get "portrait" reported for allowed orientations (even though I think I
have set all orientations as allowed). And of course the program is not
auto-rotating. Could someone kindly let me know what it is I am doing wrong?
Many thanks
-- Mark
(LC version is 5.0.2 although I think the same problem exists in .0.1)
--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/auto-rotation-in-5-0-1-02-tp4111266p4111346.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list