iOS 7. Change page orientation only for one view controller
I have iPhone application that supports only Portrait orientation. I want to add to my project view controller that will support only Landscape orientation? Is it possible? If yes how could I achieve that? I have tried to crate category file like this: @implementation UINavigationController (Rotation_IOS7) -(BOOL)shouldAutorotate { return YES; } -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscape; } If I do this I get this error: Terminating app due to uncaught exception UIApplicationInvalidInterfaceOrientation , reason: Supported orientations has no common