Launch Image names of iPhoneX?

后端 未结 5 1601
渐次进展
渐次进展 2021-02-07 01:12

A question about iPhoneX. I want put Launch Image of iPhoneX( 1125px × 2436px) in common folder. Not in LaunchImage source. What\'s the Launch Image names of iPhoneX? just

相关标签:
5条回答
  • 2021-02-07 01:15

    You can add static launch image for iPhone X with old project with simple step:

    1, Select Assets.xcassets select launch image folder.
    2, Check "iOS 8.0 and later" in the right Attribute inspector panel.
    3, An iPhone X place holder will appear, drag an image 375w812h @ 3x to it and you are done.
    
    0 讨论(0)
  • 2021-02-07 01:27

    Following the convention it should be named Default-812h@3x.png (and Default-Landscape-812h@3x.png) (812 is the actual height in points). And looks like currently there is no way to use storyboard-powered launch screen and have pixel perfect images for both iPhone X and old plus sizes models.

    0 讨论(0)
  • 2021-02-07 01:31

    If the launchImage source name is 'LaunchImage'.

    The name should be [UIImage imageNamed:@"LaunchImage-1100-2436h@3x.png"]

    PS: how to find it ?

    1. step 1. Open the bundle directory like /Users/hite/Library/Developer/CoreSimulator/Devices/5CFE3CFA-94F8-45EC-BAC5-xxx2/
    2. Find your application file like myFit.app, and Show Package Contents .
    3. search for the 3x.png to get the image name.
    0 讨论(0)
  • 2021-02-07 01:33

    You can add static launch image for iPhone X, only add: Default-375w-812h@3x.png

    0 讨论(0)
  • 2021-02-07 01:34

    You can define the names in your Info.plist using the UILaunchImages Key:

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

    Landscape images would work the same.

    0 讨论(0)
提交回复
热议问题