这是一个简单的单 View Controller 应用程序:
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.view.backgroundColor = [UIColor greenColor];
}
- (BOOL)shouldAutorotate
{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeRight;
}
在iOS 8中,输出是如此不同。
这与iOS 8和iOS 7的UIWindow范围的差异有关。如何获得类似iOS 7的行为?
最佳答案
这似乎是Xcode 6或iOS 8中的错误。从xib切换到 Storyboard 后,问题消失了。
关于uiviewcontroller - iOS 8和iOS 7自动旋转,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25206446/