【问题标题】:The Default.png of size 480x320 in landscape mode in iphoneiphone横向模式下大小为480x320的Default.png
【发布时间】:2010-11-22 12:42:20
【问题描述】:

我正在开发一个处于横向模式的应用程序。我有大小为 480x320 的 Default.png。 但是当它启动时,默认图像仍然是纵向模式而不是横向模式。

但是应该根据设备的定义来。

如果我使用相同大小的 default.png 已经旋转。然后它就像在旋转模式下一样。

但是应该根据设备的定义来。

请帮帮我

【问题讨论】:

标签: iphone orientation default.png


【解决方案1】:

@brentford 对问题 How to put Default.png in landscape mode? 的回答应该对您有所帮助。

还有 John Muchow 的 article,它概述了一种不同的方式来完成您想做的事情。

【讨论】:

    【解决方案2】:

    Taken straight from here

    “在 iOS 3.2 及更高版本中,iPad 应用程序可以根据设备是纵向还是横向配置提供不同的启动图像。要为不同的方向指定启动图像,您必须在标准启动映像的基本文件名。因此,每个文件名的格式如下:

    [basename][orientation_modifier][scale_modifier][device_modifier].png"

    所以在你的例子中你可以有:

    Default-Landscape.png

    Default-Portrait.png

    (Default-Landscape@2x.png for iphone 4 and Default-Landscape~ipad.png for ipad and so forth...)

    两者都必须为 320x480,并且您必须确保您的应用程序的 Info.plist 包含所有 4 个 UISupportedOrientation 值(UIOrientationPortrait、UIOrientationLandscapeLeft 等)。但请参阅我上面的链接以获得更好的解释。

    【讨论】:

      【解决方案3】:

      我相信启动画面是在没有检查方向的情况下加载的。

      【讨论】:

        【解决方案4】:

        尝试将 info.plist 文件中的 UIInterfaceOrientation 键设置为 UIInterfaceOrientationLandscapeLeft(iPhone 主页按钮在左侧)或 UIInterfaceOrientationLandscapeRight(主页按钮在右侧)。

        【讨论】:

          【解决方案5】:
          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2018-04-30
          • 2010-12-07
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多