Howto detect a portrait <-> landscape move

Getting into LiveCode for iOS? Ask your questions here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 580
Joined: Wed Nov 22, 2006 3:42 pm
Location: France
Contact:

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
Thierry Douez - https://sunny-tdz.com
Pourquoi tant de notes lorsqu'il suffit de jouer les plus belles... [Barbara]

LiveCode_Panos
Posts: 306
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: 580
Joined: Wed Nov 22, 2006 3:42 pm
Location: France
Contact:

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
Thierry Douez - https://sunny-tdz.com
Pourquoi tant de notes lorsqu'il suffit de jouer les plus belles... [Barbara]

Post Reply

Return to “iOS Deployment”