Howto detect a portrait <-> landscape move

Getting into LiveCode for iOS? Ask your questions here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Howto detect a portrait <-> landscape move

Postby 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
sunnY(rex - text2speech - perl - midi - image - pdf)
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 560
Joined: Wed Nov 22, 2006 3:42 pm
Location: France

Re: Howto detect a portrait <-> landscape move

Postby 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
--
LiveCode_Panos
 
Posts: 276
Joined: Fri Feb 06, 2015 4:03 pm

Re: Howto detect a portrait <-> landscape move

Postby 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
sunnY(rex - text2speech - perl - midi - image - pdf)
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 560
Joined: Wed Nov 22, 2006 3:42 pm
Location: France


Return to iOS Deployment

Who is online

Users browsing this forum: No registered users and 2 guests