Skip to content

Instantly share code, notes, and snippets.

@heydona

heydona/gist:4347450

Created Dec 20, 2012
Embed
What would you like to do?
UINavigationController to consult top view controller about rotation
@implementation UINavigationController (Rotation)
// iOS 6
- (BOOL)shouldAutorotate {
return [[self topViewController] shouldAutorotate];
}
- (NSUInteger)supportedInterfaceOrientations {
return [[self topViewController] supportedInterfaceOrientations];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment