我的 iPhone 应用程序包括 2 个视图方向:纵向和横向。它以纵向开始,但包含 2 个视图控制器,它们应自动旋转为横向。
那是我在横向视图中的代码:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
但是当视图在 iPhone 模拟器中加载时,虚拟设备保持纵向,并且横向视图的内容无法正确显示。我必须手动转动设备(模拟器)。
你能给我一个解决我的问题的方法吗?还是只是模拟器的问题?