Reputation: 11338
I got a sample app from internet. In which I am trying to change it's Orientation.
For changing the orientation I have write following coding :
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
And also made changes in xib's Auto-sizing.
But still its not working. What should I do ?
Upvotes: 0
Views: 186
Reputation: 243
Add UISupportedInterfaceOrientations in your info.plist and within that add all the four orientations like UIInterfaceOrientationPortrait, UIInterfaceOrientationPortraitUpsideDown, UIInterfaceOrientationLandscapeLeft, UIInterfaceOrientationLandscapeRight and make all the four enabled.
Upvotes: 0
Reputation: 49077
This should work, however if you are writing an application that uses a TabBarController you have to ensure that all viewcontrollers return YES
from this method (alternative could be YES for some orientations).
Upvotes: 1