【发布时间】:2012-11-04 19:38:29
【问题描述】:
我在使用 IOS 6 时遇到问题,显示器显示为纵向而不是横向。 我同时使用真实设备和模拟器设备,如果我在 5.1 模拟器上构建游戏,如果我使用模拟器版本 6 或带有版本 6 的真实设备,则视图会正确呈现,视图是纵向视图。 这是我的代码。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
if( interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
interfaceOrientation == UIInterfaceOrientationLandscapeRight )
return YES;
知道如何解决这个问题吗?
谢谢 呃
【问题讨论】:
-
哦,拜托,Apple 的文档和发行说明中已经对此进行了广泛的介绍,并且 Stack Overflow 上关于 iOS 6 中新的自动旋转行为有数千个问题。
-
shouldAutorotateToInterfaceOrientation在 iOS 6 中已弃用。查看 UIViewController 文档..