【发布时间】:2009-11-24 18:58:46
【问题描述】:
当我清理所有目标并软重置(保持在家和电源约 10 秒)我的 iPod Touch(第 2 代)时,这个问题刚刚出现。看起来视图可能是纵向旋转的。
这是问题的图片:
alt text http://img7.imageshack.us/img7/5582/iphonescreenshot.png
视图链接到一个 XIB 文件,我在界面生成器中设置了景观。我也用
<key>UIInterfaceOrientation</key>
<string>UIInterfaceOrientationLandscapeRight</string>
在 info.plist 文件中,并使用
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
在主视图控制器和子视图控制器中。
我的视图层次结构是:App delegate Window (Linked to App Delegate) -> MainViewController View (Linked to MainViewController) -> SubViewController View (Linked to SubViewController)。
谢谢,
尼尔。
编辑:我正在尝试实现全黑全屏视图。 IB 中的宽度和高度看起来还可以。 (480,320)
【问题讨论】:
标签: iphone objective-c uiview