Is there a way to use different "default" device orientation for individual scenes?

Greetings!

I am developing a game using Corona SDK and it has 2 scenes.

I need my game to be supported with both orientations: portrait and landscape.

Setting the default orientation in build.settings will affect the whole app.

I know it is possible to change the status bar using display.setStatusBar() function even after setting UIStatusBarHidden in build.settings.

I’d like to know if there is any way to change the default orientation at runtime.

I already tried to lock the screen in a single orientation by setting the content flag in the build file and manually flip the objects inside the scenes by adding an event listener to orientation.

Unfortunately, this will not solve my problem because I need native UI interface elements like the keyboard and alerts to be locked in one orientation in one of the scenes.

Thanks in advance!

Best Regards,

Douglas Bissoli.

Hi Douglas,

At this time, you can’t lock the orientation “per scene” and still use native objects like alert and keyboard. Do you use native objects in both scenes, i.e. the keyboard appears vertically in one, and horizontally in the other? Or are the native objects only in one scene?

Regards,

Brent

I use native elements in both scenes.

In this case, I think that I will have to redesign my interface.

Thank you.

Best Regards,

Douglas Bissoli.

Hi Douglas,

At this time, you can’t lock the orientation “per scene” and still use native objects like alert and keyboard. Do you use native objects in both scenes, i.e. the keyboard appears vertically in one, and horizontally in the other? Or are the native objects only in one scene?

Regards,

Brent

I use native elements in both scenes.

In this case, I think that I will have to redesign my interface.

Thank you.

Best Regards,

Douglas Bissoli.