0

I have an app which I have locked to Portrait mode from project settings. Also should rotate is false etc. On the simulator (and devices) when I am on an iPhone device and rotate the labels and views stay on their places. But on the iPad when I change to landscape the views try to re-arrange. Why is this happening? Thank you.

PoolHallJunkie
  • 1,345
  • 14
  • 33
  • Check the accepted answer from here: http://stackoverflow.com/questions/29664441/different-device-orientation-according-to-device-iphone-or-ipad – Matthew Seaman Oct 26 '16 at 01:46

1 Answers1

0

As mathew said try something like this

Following the advice of @ScarletMerlin , changing the keys in info.plist is, in my opinion, the best solution for the requirements I have to fulfill (fixed orientation type for each kind of device).

Here is a print screen from the settings I use. Maybe it can help other developers with similar doubt.

Settings in info.plist file

The relavent source code looks like this:

<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>
Vinodh
  • 5,262
  • 4
  • 38
  • 68