我正在使用此类别来支持 ios 6 中的自动旋转
@implementation UINavigationController (RotationIn_IOS6)
-(BOOL)shouldAutorotate
{
NSLog(@"Last Object is %@",[[self.viewControllers lastObject] description]);
return [[self.viewControllers lastObject] shouldAutorotate];
}
-(NSUInteger)supportedInterfaceOrientations
{
return [[self.viewControllers lastObject] supportedInterfaceOrientations];
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return [[self.viewControllers lastObject] preferredInterfaceOrientationForPresentation];
}
我的应用程序设置是这样的
- 显示带有导航控制器旋转的密码屏幕适用于两者(模拟器,设备)。
- 验证用户并显示主页屏幕旋转仅适用于模拟器而不适用于设备
-(BOOL)shouldAutorotate
在主屏幕中实现任何人都知道如何解决这个问题?