Prevent autorotate for one view controller?
My app can autorotate but I need one of the views to only show in portrait mode and don't know how to achieve this. I tried this (among other things) but the view in question still rotates: // ViewController.m -(BOOL)shouldAutorotate { return NO; } - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } Can someone kindly point out what I'm doing wrong? Thanks. -edit- It's for iOS 6.1 When a UINavigationController is involved, create a category on the UINavigationController and override supportedInterfaceOrientations . #import "UINavigationController