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
Howto detect a portrait <-> landscape move
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Howto detect a portrait <-> landscape move
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
-
- Livecode Staff Member
- Posts: 818
- Joined: Fri Feb 06, 2015 4:03 pm
Re: Howto detect a portrait <-> landscape move
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
--
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
Thanks Panos, works like a charm.LiveCode_Panos wrote:You can use the "orientationChanged" msg, or the "resizeStack" msg.
Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!