gpt4 book ai didi

uiviewcontroller - iOS 8和iOS 7自动旋转

转载 作者:行者123 更新时间:2023-12-04 07:22:37 25 4
gpt4 key购买 nike

这是一个简单的单 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com