Howto detect a portrait <-> landscape move

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

Howto detect a portrait <-> landscape move

Post by Thierry » Sun Jun 04, 2017 10:21 am

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
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Howto detect a portrait <-> landscape move

Post by LiveCode_Panos » Sun Jun 04, 2017 10:30 am

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
--

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

Re: Howto detect a portrait <-> landscape move

Post by Thierry » Mon Jun 05, 2017 9:46 am

LiveCode_Panos wrote:You can use the "orientationChanged" msg, or the "resizeStack" msg.
Thanks Panos, works like a charm.

Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!

Post Reply

Return to “iOS Deployment”