Support different orientations on iPad vs. iPhone?

Hi,


I have a universal app. I want to support portrait and landscape on iPad, but only portrait on iPhone. What is the best way to do this?


The "Device orientation" checkboxes in the project settings appear to apply to both versions.


Thanks.

In the general tab of the target for your app, you should see a segment between iPhone and iPad along with Device orientation settings for each one.

One way to bifurcate orientations based on device is to use idioms*... and for launch orientations, set them in the info.plist:


<key>UIInterfaceOrientation</key>

<string>UIInterfaceOrientationPortrait</string>

<key>UIInterfaceOrientation~ipad</key>

<string>UIInterfaceOrientationLandscapeRight</string>


* http://stackoverflow.com/questions/24059327/detect-current-device-with-ui-user-interface-idiom-in-swift

◅▻

Support different orientations on iPad vs. iPhone?
 
 
Q