Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

How to disable orientation change only for smartphone / iPhone, not for tablets / iPad ?
Started by orangecyan Jul 16 2015 12:15 PM

1 reply to this topic
build settings orientation device rotation tablet smartphone orientation change
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 24 posts
  • Corona SDK



my aim is to build an app with build settings that make a difference in orientation change between smartphones and tablets: tablets should run in portrait+landscape, smartphones run in portrait mode only.
The build.settings do not allow any calculation, renaming in build.lua in order to place some code didn't work either.
How can I do this?
Thanks for help!

[TOPIC: post.html]

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,789 posts
  • Enterprise

You have to used a fixed orientation in build.settings and then detect orientation changes in your app and rotate the screen 90 degrees when you detect the orientation you allow. You may have to rotate all your objects simply rotating the screen as a whole generally won't redraw everything in the new orientation that you want.