0
在我的应用程序中,旋转在iOS7中正常工作,但在iOS8中不起作用。主要故事板设置影响iOS8中的旋转功能
正如你所看到的,在状态栏旋转,但视图控制器不。
我发现问题是由主故事板设置引起的,但我不知道为什么它引起了这个问题。我刚刚删除了项目文件中的主要故事板设置,并且在iOS8中一切正常。
以下是我的代码加载故事板。
[self setMainStoryboard:[UIStoryboard storyboardWithName:@"MainStoryboard-ipad" bundle:nil]];
UIViewController *vc = [mainStoryboard instantiateInitialViewController];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
[self.window setRootViewController:vc];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
也许我用错误的方式加载故事板?