【问题标题】:iPhone view is 3/4 grey, could be rotated incorrectlyiPhone 视图为 3/4 灰色,可能旋转不正确
【发布时间】: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


    【解决方案1】:

    在 IB 中检查您的弹簧和支柱;在不知道您在这里尝试实现什么的情况下,很难推荐一个行动方案。我想你想要全屏,黑色或灰色,所以很可能你没有将相关视图设置为全宽和-高度。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多