Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

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
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

orangecyan

[GLOBAL: userInfoPane.html]
orangecyan
  • Observer

  • 24 posts
  • Corona SDK

Hello,

 

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]
#2

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.

 

Rob




[topic_controls]
[/topic_controls]