Reputation: 1340
I had an old iPad app which was displayed in landscape orientation alone. I am trying to run the same application in iOS 6 and the application is starting in the Portrait mode irrespective of the view controllers orientation set. I know that there are changes in the iOS 6. as below.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight) || (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
- (BOOL)shouldAutorotate {
return YES;
}
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskLandscape;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
return UIInterfaceOrientationLandscapeLeft;
}
Although i have these lines in the code, It doesn't seems to be changing the orientation. I also noticed that the Main Window xib has the window in portrait mode. Is it possible to change the orientation of the window or is this due to something else?
Upvotes: 0
Views: 169
Reputation:
Select the code Project and you will get 4 icon of iPad on the Summery tab
Select the orientation which you want.. this will modify your info.plist as well
Upvotes: 1
Reputation: 24572
there is a value in the info.plist file for supported orientations. Did you change that?
Upvotes: 2