我使用这个类支持在iOS设备自动旋转6奇怪iOS6的自动旋转的Bug
@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
在主屏幕 任何人知道如何解决这个实施?
实际问题是什么? – 2013-05-10 10:56:53
您是否已在您的“主屏幕”视图控制器中实施了' - (NSUInteger)supportedInterfaceOrientations'? – 2013-05-10 11:12:30
设备的iOS版本是什么? – 2013-05-10 11:24:50