【发布时间】:2012-02-22 20:29:49
【问题描述】:
我的 iPhone 应用程序包括 2 个视图方向:纵向和横向。 它以纵向开始,但包含 2 个视图控制器,它们应该自动旋转到横向。
这是我在横向视图中的代码:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
但是当视图在 iPhone 模拟器中加载时,虚拟设备保持纵向,并且横向视图的内容无法正确显示。 我必须手动(模拟器)转动设备。
你能给我一个解决我的问题的方法吗? 还是只是模拟器的问题?
【问题讨论】:
标签: ios-simulator landscape autorotate portrait landscape-portrait