Forcing an orientation on the iPad

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Forcing an orientation on the iPad

Post by andyh1234 » Tue Jan 18, 2011 8:00 pm

Is there a way to force landscape orientation to be used.

I understand you can query which is currently in use, you can set which orientations the iPad will rotate to, and once in an Orientation you can lock in that orientation, but what I need if possible is a way to force the iPad to rotate to landscape even if the user starts the app in portrait.

I realise its not good generally to lock users into one way up or the other, but in this case it is justified as this content is optimised for 1024 x 768, so I would like to have the device rotate the display on start.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4166
Joined: Sun Jan 07, 2007 9:12 pm

Re: Forcing an orientation on the iPad

Post by bn » Tue Jan 18, 2011 8:33 pm

Hi Andy,

in the standalone application settings->iOS:

Bildschirmfoto 2011-01-18 um 20.26.09.png
Bildschirmfoto 2011-01-18 um 20.26.09.png (17.84 KiB) Viewed 5580 times
does restrict the possible orientations

Kind regards

Bernd

andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Re: Forcing an orientation on the iPad

Post by andyh1234 » Tue Jan 18, 2011 9:51 pm

I tried that with my iPad, but it didnt lock it down if the app is started with the iPad in portrait mode.

I found it only locks it as soon as the users turns to landscape, then it locks correctly and stays in landscape.

Ideally I would like the user to be able to start in portrait or landscape as I can have 99% of the app in either mode and switch between the two happily, but for the landscape only sequences I could do with forcing the display to rotate to landscape and stay there.

If its not possible I guess I can rotate all the items and show them is 'psuedo' landscape, but that would probably mean having two copies of all the assets for speed, or alternatively, does anyone know how to rotate an entire group with all its contents??

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4166
Joined: Sun Jan 07, 2007 9:12 pm

Re: Forcing an orientation on the iPad

Post by bn » Tue Jan 18, 2011 10:03 pm

Hi Andy,

this works for me. Starts in landscape whatever orientation the iPad has at the start of the application.

Make shure you set the Initial Orientation to Landscape and only tick landscape left and landscape right

Kind regards

Bernd

andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Re: Forcing an orientation on the iPad

Post by andyh1234 » Tue Jan 18, 2011 11:02 pm

Thanks, Ill try again with a blank stack, I guess ive probably added some code somewhere that is messing things up.

Post Reply