Skip to content

Instantly share code, notes, and snippets.

@heydona
Created December 5, 2012 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heydona/4220383 to your computer and use it in GitHub Desktop.
Save heydona/4220383 to your computer and use it in GitHub Desktop.
iOS UIViewController rotation category
@implementation UIViewController (Rotation)
// iOS 6
- (BOOL)shouldAutorotate {
return YES;
}
- (NSUInteger)supportedInterfaceOrientations {
return IPAD ? UIInterfaceOrientationMaskAll : UIInterfaceOrientationMaskAllButUpsideDown;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment