I am building an app that will be Portrait only for the main views (Both normal and upside down). I have set this setting in the Project Settings/Plist and all works fine. However, I have a few modal views that do things like display images/videos, and I want them to be able to rotate to ALL orientations.
I tried adding a category for UINavigationController but no luck. I have also added to the viewController that calls the modal the below code:
-(BOOL)shouldAutomaticallyForwardAppearanceMethods{
return NO;
}
-(BOOL)shouldAutomaticallyForwardRotationMethods{
return NO;
}
I have added the below code to the modal viewControllers that I want to allow all orientations:
- (BOOL)shouldAutorotate {
return YES;
}
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAll;
}
What am I missing? Any suggestions?
-supportedOrientations
method – Sophist