Currently, in my app, I need to NOT allow side orientation to occur except for one view that is supposed to show another uiview when the user side-orients. Suppose I have 20 UIViewControllers that are allowed to be accessed from the mainviewcontroller (UINavigationController). Now, also suppose that UIViewController #7, when shown has two views, one that is shown for side orientation and one for portrait orientation. I don't want you guys to think I want to eliminate Rotation Orientation throughout the app's life but just for 19 of the views, and the last uiviewcontroller have support for it.
If a user does side-orient for that one view, then the user should just see the app as usual with no orientation effects.
I want the user to only use the portrait orientation view and thats it for that one viewcontroller. Maybe if the user rotates the phone 180 degrees, upsidedown, then sure, the app should flip but still be in a portrait view.
ANyone have any ideas? I'm deploying to iOS 6.1 so some methods I have used are deprecated which is what I want to stay away from...
Such as this method:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
return NO;
}
I have done several test cases:
- (NSUInteger) supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationPortrait;
}
- (BOOL) shouldAutorotate{
return NO;
}
I've also checked up on stackoverflow related questions and I can't simply find an answer.
I figure this should be one maybe two methods I override but I can't do this..... How do I eliminate side orientation in a UIViewController????