【发布时间】:2014-05-24 14:28:25
【问题描述】:
我刚刚开始在 Xcode 中为 iOS 7.0+ 创建应用程序的 tutorial。
但是,当我运行应用程序并在 iOS 模拟器 中旋转设备时,应用程序的位置在纵向模式下保持固定,而屏幕确实变为横向大小。这显然不应该发生,因为它只适用于教程。
有人可以帮我解决这个问题吗?
编辑 1: 我已经勾选了所有框,这没有帮助。我还添加了代码
- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
{
if ( interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationPortrait)
return YES; // for supported orientations
return NO;
}
这也没有做任何事情,我也已经注意到supported interface orientation 的数组已经存在。可能问题出在 iOS 模拟器
编辑 2:
对不起,我的愚蠢,iOS的旋转锁定出于某种原因...谢谢大家
【问题讨论】:
标签: ios iphone objective-c xcode ios-simulator