0

Im converting an Iphone app to a universal App, I have created an Ipad specific view controller to deal with the view, However the view doesnt rotate and i cant see what im missing.

the shouldAutorotateToInterfaceOrientation on the view always returns yes but the view doesnt move.

It is within a tab bar application structure

Tab Bar Controller > Navigation Controller > View Controller

and the lock isnt on either.

Sergey K.
  • 24,894
  • 13
  • 106
  • 174
RumbleG
  • 3
  • 1

2 Answers2

2

Did you update the application's Info.plist settings with the supported orientations?

You can do it by clicking on the project name on the left -> Targets -> Summary and click on your supported orientations based on the device.

You can also add it to the plist file directly by editing the plist file, or adding new rows using the property list editor.

<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>
aporat
  • 5,922
  • 5
  • 32
  • 54
0

You have to make sure ALL the view controllers you have support rotation, even if the are in different tabs, otherwise you won't get the rotation effect.

Radu Lucaciu
  • 706
  • 3
  • 6