【发布时间】:2013-02-12 20:08:27
【问题描述】:
我到处寻找,但在 iOS 6 中我找不到解决这个烦人的旋转问题的方法。
由于某种原因,我无法在 iOS 6 中使用旋转方法。他们甚至没有被调用。
例如:
如果我想在 iOS 5 中以纵向模式保持视图,我使用:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
我了解到iOS 6中的新方法应该是:
- (NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskPortrait;
}
我也尝试添加:
-(BOOL)shouldAutorotate
{
return NO;
}
但它根本不起作用。
请帮忙!
【问题讨论】:
标签: ios5 ios6 rotation orientation