【发布时间】:2011-08-19 02:18:51
【问题描述】:
我正在创建一个横向向右方向的应用程序。为此,我在 info.plist 文件中设置了 Initial interface orientation 属性。然后在我处理的每个视图中
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return(interfaceOrientation==UIInterfaceOrientationLandscapeRight);
}
它在模拟器中运行良好,但在设备中表现不同。 我的第一个观点是正确的方向。有一个弹出框显示另一个以纵向模式出现的视图。我的状态栏仍然在横向右侧..
为了从一个视图导航到我正在使用的另一个视图..
self.window.rootViewController = self.myNav;
我有多个导航控制器并使用上面的代码添加那些。 我不明白是什么问题。
我们将不胜感激。
EDIT:我用过
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
我从来没有在模拟器中遇到过这个问题,但不是每次都在设备中遇到这个问题。我也使用了Supported interface orientations (iPad) 并为item0 设置了Landscape (right home button) 值。
提前致谢
【问题讨论】:
标签: ios ipad orientation