Page 1 of 1
Howto detect a portrait <-> landscape move
Posted: Sun Jun 04, 2017 10:21 am
by Thierry
Hi all,
Do we have a message for iOS when moving the device from portrait to landscape or vice-versa?
Thanks for any hint.
Thierry
Re: Howto detect a portrait <-> landscape move
Posted: Sun Jun 04, 2017 10:30 am
by LiveCode_Panos
Hi Thierry,
You can use the "orientationChanged" msg, or the "resizeStack" msg.
But note (taken from dictionary):
"The orientationChanged message is sent before any automatic interface rotation takes place thus changes to the orientation lock state and allowed set can be made at this point and still have an effect. If you wish to perform an action after the interface has been rotated, then either do so on receipt of resizeStack, or by using a send in 0 milliseconds command."
Best,
Panos
--
Re: Howto detect a portrait <-> landscape move
Posted: Mon Jun 05, 2017 9:46 am
by Thierry
LiveCode_Panos wrote:You can use the "orientationChanged" msg, or the "resizeStack" msg.
Thanks Panos, works like a charm.
Thierry