Created
December 5, 2012 23:14
-
-
Save heydona/4220383 to your computer and use it in GitHub Desktop.
iOS UIViewController rotation category
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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