处理iPhone 6/6 +启动图像 [英] Dealing with iPhone 6/6+ startup images

查看:121
本文介绍了处理iPhone 6/6 +启动图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我过去只使用两种屏幕尺寸,但现在宣布新的 iPhone 6/6 + 之后,我需要处理四种屏幕尺寸,那么如何指定这些设备启动图片 ??

I used to simply work with two screen sizes, but now after the new iPhone 6/6+ are announced I need to deal with four screen sizes, So How could I specify the startup images for these new devices ??

提前致谢

.xcassests 文件中,我发现在 Xcode 6 GM中添加了新设置 Retina HD 5.5 )和( Retina HD 4.7 ),我想很容易找到哪一款适用于iPhone 6以及哪款适用于iPhone 6+但是它是什么这些启动图像的名称默认为??

In .xcassests file I found new settings added in Xcode 6 GM which is (Retina HD 5.5) and (Retina HD 4.7), I guess it's easy to find which one is for iPhone 6 and which for iPhone 6+ but what's the name for these startup images by default ??

因为我通常不使用 .xcassests 文件

3.5 inches = Default.png
(320px x 480px)

3.5 inches (with retina) = Default@2x.png
(640px x 960px)

4.0 = Default-568h@2x.png
(640px x 1136px)

4.7 = ??
(750px x 1334px)

5.5 = ??
(1242px x 2208px) 






答案:



经过一些搜索后,我找到了以下答案:


The Answer:

After some search later, I found the following answer:

3.5 inch screen: LaunchImage-700@2x.png
4.0 inch screen: LaunchImage-700-568h@2x.png
4.7 inch screen: LaunchImage-800-667h@2x.png
5.5 inch screen: LaunchImage-800-Portrait-736h@3x.png
iPad2          : LaunchImage-700-Portrait~ipad.png
Retina iPads   : LaunchImage-700-Portrait@2x~ipad.png


推荐答案

你可以随意命名,只需要确保它们在你的plist中,并且你没有在plist中指定扩展名或@ 2x或@ 3x后缀。 Xcode项目中的文件应具有.png和@ 2x或@ 3x扩展名。大小始终以纵向模式指定(即使是横向图像)。

You can name them whatever you want, you just have to make sure they are in your plist, and that you don't specify the extension or @2x or @3x suffix in the plist. The files in your Xcode project should have the .png and @2x or @3x extension. The size is always specified in portrait mode (even for landscape images).

这样做的好处是不使用资产目录并允许您轻松加载png你的应用程序可以从启动画面到你的应用程序进行自定义转换。

This has the added benefit of not using the asset catalog and allowing you to easily load the png in your app to do a custom transition from the splash screen to your app.

以下是我的应用程序中的示例,你涂鸦

Here's an example from my app, You Doodle:

<key>UILaunchImages</key>
<array>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key><string>7.0</string>
        <key>UILaunchImageOrientation</key><string>Portrait</string>
        <key>UILaunchImageSize</key><string>{320, 480}</string>
        <key>UILaunchImageName</key><string>Default</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key><string>7.0</string>
        <key>UILaunchImageOrientation</key><string>Portrait</string>
        <key>UILaunchImageSize</key><string>{320, 568}</string>
        <key>UILaunchImageName</key><string>Default-568h</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key><string>7.0</string>
        <key>UILaunchImageOrientation</key><string>Landscape</string>
        <key>UILaunchImageSize</key><string>{768, 1024}</string>
        <key>UILaunchImageName</key><string>Default-Landscape</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key><string>7.0</string>
        <key>UILaunchImageOrientation</key><string>Portrait</string>
        <key>UILaunchImageSize</key><string>{768, 1024}</string>
        <key>UILaunchImageName</key><string>Default-Portrait</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key><string>8.0</string>
        <key>UILaunchImageOrientation</key><string>Landscape</string>
        <key>UILaunchImageSize</key><string>{414, 736}</string>
        <key>UILaunchImageName</key><string>Default-Landscape-736h</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key><string>8.0</string>
        <key>UILaunchImageOrientation</key><string>Portrait</string>
        <key>UILaunchImageSize</key><string>{414, 736}</string>
        <key>UILaunchImageName</key><string>Default-Portrait-736h</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key><string>8.0</string>
        <key>UILaunchImageOrientation</key><string>Portrait</string>
        <key>UILaunchImageSize</key><string>{375, 667}</string>
        <key>UILaunchImageName</key><string>Default-Portrait-667h</string>
    </dict>
</array>

这篇关于处理iPhone 6/6 +启动图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆