Setting default orientation

Is there any way to set the default orientation to anything other than Portrait (say, Landscape Left)?

I know that I can use the orientation events to rotate my views, and I know that if I want to lock it I could just not respond to them. But that doesn’t solve the problem, that the status bar would still be at the left of the screen because it would technically still be Portrait mode. [import]uid: 6557 topic_id: 972 reply_id: 300972[/import]

This is logged as Case # 25. [import]uid: 54 topic_id: 972 reply_id: 2235[/import]

If you are using the beta versions of the sdk you can put a file in your project directory called build.settings that allows you to make entries in your info.plist and to change the default orientation. For instance, to default to landscape left you’d do:

settings = {
orientation = {
default = “landscapeLeft”
}
}

The available values are “portraitUpsideDown”, “portrait”, “landscapeRight” and of course “landscapeLeft”. Note that this will currently LOCK the device to this orientation since an orientation change event to Corona is not the same as overriding shouldRotateToInterfaceOrientation or shouldAutorotateToInterfaceOrientation. This means that if you default to a certain orientation and you use any native widgets, they will be displayed in that orientation. Note also that the web popup doesn’t respect the default orientation and will always be in portrait mode.

  • Nick [import]uid: 70 topic_id: 972 reply_id: 2365[/import]

Thx Abica - it now works with the standard downloads as well. Saved my day :slight_smile: [import]uid: 9175 topic_id: 972 reply_id: 6323[/import]