【问题标题】:ipad default-landscape not displayingipad默认横向不显示
【发布时间】:2010-06-15 19:42:07
【问题描述】:

我已经添加了两张图片。 Default-Portrait.png 和 Default-Landscape.png。但是每当我启动我的应用程序时,无论方向如何,都只会显示纵向默认图像。

为什么会这样?

【问题讨论】:

    标签: ipad screen-orientation


    【解决方案1】:

    我遇到了同样的问题,并通过将以下内容添加到 Info.plist 文件(来自 Xcode)中解决了它:

    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    

    【讨论】:

    • 天才。这已经让我好几天了!
    【解决方案2】:

    您是否添加了代码以根据方向交换图像?我猜这个应用程序不会知道你想要什么图片,除非你告诉它。

    UIInterfaceOrientation 参数

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-04-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多