Skip to main content
Inspiring
January 3, 2013
Answered

Portrait on iPhone and Landscape on iPad

  • January 3, 2013
  • 1 reply
  • 2070 views

We are designing a mobile application that should be a universal app and deploy supporting Portrait on iPhone and Landscape on iPad.

I am a bit confused on setting the app information.

If I set aspectRatio to any and autoOrients to false, would that make app-store actually reject the app?

(If they test it on iPad they would see the app not supporting 2 orientations while the descriptor lists that support).

thanks

This topic has been closed for replies.
Correct answer vabhatia

If you want to acheive portait on iPhone and Landscape on iPad, you should check for the device type on app launch and change the aspect ratio if needed. For example:- you can keep aspect ratio as portait and auto orients as false in appication descriptor and on app launch you can check for ipad and only then change the aspect ratio to landscape. You can design you launch images accordingly as per the desired aspect ratio.

1 reply

vabhatiaCorrect answer
Adobe Employee
January 4, 2013

If you want to acheive portait on iPhone and Landscape on iPad, you should check for the device type on app launch and change the aspect ratio if needed. For example:- you can keep aspect ratio as portait and auto orients as false in appication descriptor and on app launch you can check for ipad and only then change the aspect ratio to landscape. You can design you launch images accordingly as per the desired aspect ratio.

Inspiring
January 4, 2013

I tried that, but it is a little bit buggy.

You see the iOS device (iPad or iPhone) seems to be respecting the original aspectRatio defined in the application descriptor.

The tests I did (FB 4.7, AIR 3.4, iOS6 on iOS Simulator):

a- Set the autoOirents to false and aspectRatio to Portrait in the application descriptor.

When the app launches, I check the device then set the aspect ratio using stage.setAspectRatio.

Results: iPhone works, but on iPad, it works on initial launch even if the device was actually held in portrait. But if you keep rotating, it justswitches back to Portrait and gets stuck.

b- Same as above but set aspectRatio to landscape in the application descriptor.

Results: iPad works. iPhone works on initial launch even if the device was actually held in landscape. But if you keep rotating, it justswitches back to Landscape and gets stuck.

I will do the same test on a device to see if it also breaks after rotation.

Inspiring
January 4, 2013

Same tests on Device, it is working fine. So it seems some weird bug the iOS simulator.