@implementation UINavigationController (Rotation_iOS6) -(BOOL)shouldAutorotate { return YES; } -(NSUInteger)supportedInterfaceOrientations { if ([navigationControllerObjectisKindOfClass:[AppNavigationController class]]) { return UIInterfaceOrientationMaskPortrait; } else { switch ([UIDevice currentDevice].orientation) { case UIDeviceOrientationLandscapeLeft: return UIInterfaceOrientationMaskLandscape; case UIDeviceOrientationLandscapeRight: return UIInterfaceOrientationMaskLandscape; default: return UIInterfaceOrientationMaskPortrait; } } } - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { if ([navigationControllerObject{ return UIInterfaceOrientationPortrait; } else { switch ([UIDevice currentDevice].orientation) { case UIDeviceOrientationLandscapeLeft: return UIInterfaceOrientationLandscapeLeft; case UIDeviceOrientationLandscapeRight: return UIInterfaceOrientationLandscapeRight; default: return UIInterfaceOrientationPortrait; } } } @endisKindOfClass:[AppNavigationController class]])
System programming, Cluster computing, Writing Operating System, iOS application Development, Advanced C programming, Assembly langauge, C++
Thursday, November 8, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment