Block auto rotation?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Block auto rotation?
Hi everyone,
I'm trying to force the iphone to saty in vertical (portrait) mode.
I want to block it from rotating and therefore adapating my app to the horizontal mode.
Is there any way to do it (or fake it) ?
Thank you all for your help !
AD
I'm trying to force the iphone to saty in vertical (portrait) mode.
I want to block it from rotating and therefore adapating my app to the horizontal mode.
Is there any way to do it (or fake it) ?
Thank you all for your help !
AD
Re: Block auto rotation?
Hi belgarion:
Not a problem. What I do is include a "iphoneLockOrientation" command in my on openStack code and it will hold whatever default orientation you have selected under the Standalone Application Settings for iOS.
Works like a charm!
Cheers
Not a problem. What I do is include a "iphoneLockOrientation" command in my on openStack code and it will hold whatever default orientation you have selected under the Standalone Application Settings for iOS.
Works like a charm!
Cheers
Re: Block auto rotation?
Hey RickD !
Thanks a lot for your fast answer and great help !
Big Big Thanks !
Beslgarion
Thanks a lot for your fast answer and great help !
Big Big Thanks !
Beslgarion
Re: Block auto rotation?
Thank you!!!
I hope that the iOS documentation is expanded soon... hopefully integrated into the dictionary.
I hope that the iOS documentation is expanded soon... hopefully integrated into the dictionary.
Check out my LiveCode program, WriteSpire, on the App Store!
-
- VIP Livecode Opensource Backer
- Posts: 153
- Joined: Thu Jun 29, 2006 4:16 pm
Re: Block auto rotation?
Hi All,
I'm having trouble getting my app to stick in one orientation. Before I describe my problem would one of you try something for me and let me know what happens.... First, I understand you are making a app to work only in portrait mode, correct? If so, tell me what settings you used in the iOS Application Settings.... I assume Initial Orientation is set to portrait and Supported Orientations is set to portrait.
Now, hold your real device (I'm using an iPod Touch) in landscape mode and open your app.... what happens?
take care,
randy hengst
I'm having trouble getting my app to stick in one orientation. Before I describe my problem would one of you try something for me and let me know what happens.... First, I understand you are making a app to work only in portrait mode, correct? If so, tell me what settings you used in the iOS Application Settings.... I assume Initial Orientation is set to portrait and Supported Orientations is set to portrait.
Now, hold your real device (I'm using an iPod Touch) in landscape mode and open your app.... what happens?
take care,
randy hengst
Re: Block auto rotation?
I'm using Landscape and an iPad (rather than Portrait and an iPod) but it works perfectly, the app starts up on the device in Landscape and stays there, no matter what way I turn it.
-- Walt Sterdan
-- Walt Sterdan
-
- VIP Livecode Opensource Backer
- Posts: 153
- Joined: Thu Jun 29, 2006 4:16 pm
Re: Block auto rotation?
Hi Walt
Thank for your response.
What happens when you hold the iPad in portrait and open your app? I'm using iPod and want my app to only display in landscape right. When I open in portrait, the app shows in landscape right and then immediately rotates to portrait. In fact, when I open the app with the iPod held in any orientation other than landscape right, the app rotates immediately after opening.
I've set the start up and allowed orientations to landscape right.
I've placed iphoneLockOrientation in the openStack handler and in an on StartUp handler....
How have you set things up? I simply can't see what step I'm missing.
randy hengst
Thank for your response.
What happens when you hold the iPad in portrait and open your app? I'm using iPod and want my app to only display in landscape right. When I open in portrait, the app shows in landscape right and then immediately rotates to portrait. In fact, when I open the app with the iPod held in any orientation other than landscape right, the app rotates immediately after opening.
I've set the start up and allowed orientations to landscape right.
I've placed iphoneLockOrientation in the openStack handler and in an on StartUp handler....
How have you set things up? I simply can't see what step I'm missing.
randy hengst
-
- Livecode Staff Member
- Posts: 120
- Joined: Thu Feb 23, 2006 7:57 pm
Re: Block auto rotation?
We've explained how to do this in more detail in the latest version of handbook (4.5.3-dp-1/rc-1). You need to use iphoneSetAllowedOrientations in a 'startup' handler.
Kevin Miller ~ kevin@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
LiveCode: Everyone can create apps
-
- VIP Livecode Opensource Backer
- Posts: 153
- Joined: Thu Jun 29, 2006 4:16 pm
Re: Block auto rotation?
Hi Kevin,
Yes, I know... my startup handler is in the stack script. Is that where it goes? The do not see in the docs where to put the handler.
on startup
iphoneSetAllowedOrientations "landscape right"
iphoneLockOrientation
end startup
I have tried the handler without the lock statement. I've tried to put both statements in the openStack handler. I've tried calling the startUp handler from the openStack handler.
I am working with the same stack that I submitted to Apple using 4.5.1 and the plugin version... the landscape worked and stuck using that version.
take care,
randy
Yes, I know... my startup handler is in the stack script. Is that where it goes? The do not see in the docs where to put the handler.
on startup
iphoneSetAllowedOrientations "landscape right"
iphoneLockOrientation
end startup
I have tried the handler without the lock statement. I've tried to put both statements in the openStack handler. I've tried calling the startUp handler from the openStack handler.
I am working with the same stack that I submitted to Apple using 4.5.1 and the plugin version... the landscape worked and stuck using that version.
take care,
randy
Re: Block auto rotation?
As mentioned, I'm building a landscape app; if I open the app in portrait, the first image shows up correctly (landscape rotated, top of picture pointing to the left). Interestingly enough, under 4.5.2 (build 1150) the picture starts off scrunched, then fills the screen. The image is scrunched vertically (in relation to the picture, regardless of orientation) and immediately expands to fill the screen. It only lasts for a small fraction of a second, but It doesn't happen with any of the earlier builds.Randy Hengst wrote: What happens when you hold the iPad in portrait and open your app? I'm using iPod and want my app to only display in landscape right. When I open in portrait, the app shows in landscape right and then immediately rotates to portrait. In fact, when I open the app with the iPod held in any orientation other than landscape right, the app rotates immediately after opening.
-- Walt Sterdan