Dealing with iPhone 6/6+ startup images

2020-07-18 06:40发布

问题:

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 ??

Thanks in advance


Update

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 ??

because I don't usually work with .xcassests file

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

回答1:

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).

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>


回答2:

Just check this link

https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html#//apple_ref/doc/uid/TP40006556-CH27

You have to use @3x size image for start up image



回答3:

Details are already there, you just need to check the attribute inspector.