tags:

views:

51

answers:

1

I recently submitted my app for the ipad, and it was rejected for not supporting all four orientation types. Right now I have it set up so that it auto rotates to landscaperight and doesn't rotate again. How would I let it rotate to the other three orientations(or just the two landscapes(because I don't want to create new xibs unless I have to).

A: 

You should be able to use one xib if you have the autoresize masks set up correctly, and you set the appropriate keys in the Info.plist file:

<key>UISupportedInterfaceOrientations~ipad</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>
lucius
I have the keys in my info.plist, but how do I set up my autoresizing masks? If possible I would like to just keep my app to landscape(both landscape orientations.
Rushil
If you use the default template for a view-based project, the view is already configured properly. If you're using a view controller, you don't have to set the autoresize masks, since the controller will resize the view for you. If you add a view in Interface Builder, the autoresize mask is set in one of the palettes. Press Command-3 to switch to the View Size palette. If you do it in code, read the docs on autoresizeMask.
lucius
ok thank you very much!
Rushil