如何设置iPad Pro静态启动图片

3
在查看苹果人机交互指南中关于图形->启动屏幕的部分时,它对静态启动屏幕图片Apple HIG有以下说明:
“最好使用Xcode故事板来创建您的启动屏幕,但如果必要,您可以提供一组静态图像。为不同设备创建不同尺寸的静态图像,并确保包括状态栏区域。”
然后列出了iOS 10支持的所有设备。
有人知道如何做到这一点吗?例如,针对12英寸iPad Pro?在资产目录中没有地方添加此类图像。我是否必须在Info.plist文件中使用UILaunchImages数组?如果是这样,请问是否有示例。
先感谢您的帮助。
1个回答

4

是的,您必须在Info.plist中使用UILaunchImages。

这是苹果的文档:

https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW28

下面是一个示例:

<key>UILaunchImages</key>
<array>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>7.0</string>
        <key>UILaunchImageName</key>
        <string>Img320x568ptsPort@2x</string>
        <key>UILaunchImageOrientation</key>
        <string>Landscape</string>
        <key>UILaunchImageSize</key>
        <string>{320, 568}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>7.0</string>
        <key>UILaunchImageName</key>
        <string>Img320x568ptsLdsc@2x</string>
        <key>UILaunchImageOrientation</key>
        <string>Portrait</string>
        <key>UILaunchImageSize</key>
        <string>{320, 568}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>7.0</string>
        <key>UILaunchImageName</key>
        <string>Img320x480ptsPort@2x</string>
        <key>UILaunchImageOrientation</key>
        <string>Landscape</string>
        <key>UILaunchImageSize</key>
        <string>{320, 480}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>7.0</string>
        <key>UILaunchImageName</key>
        <string>Img320x480ptsLdsc@2x</string>
        <key>UILaunchImageOrientation</key>
        <string>Portrait</string>
        <key>UILaunchImageSize</key>
        <string>{320, 480}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Img375x667ptsPort@2x</string>
        <key>UILaunchImageOrientation</key>
        <string>Landscape</string>
        <key>UILaunchImageSize</key>
        <string>{375, 667}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Img375x667ptsLdsc@2x</string>
        <key>UILaunchImageOrientation</key>
        <string>Portrait</string>
        <key>UILaunchImageSize</key>
        <string>{375, 667}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Img414x736ptsLdsc@3x</string>
        <key>UILaunchImageOrientation</key>
        <string>Landscape</string>
        <key>UILaunchImageSize</key>
        <string>{414, 736}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Img414x736ptsPort@3x</string>
        <key>UILaunchImageOrientation</key>
        <string>Portrait</string>
        <key>UILaunchImageSize</key>
        <string>{414, 736}</string>
    </dict>
</array>

谢谢,我会去看一下。你知道这个是用来替换资产目录的吗?还是只能用来添加消息目录中缺失的iPad Pro图片呢?例如,我是否需要在这里添加所有启动图像选项,还是只需要添加iPad Pro的选项,应用程序就会从指定的资产目录中获取其他选项呢? - rideintothesun
最终通过以下两个步骤解决了问题:1. 关闭启动图像的资源目录使用。2. 将引用的启动图像移动到 Xamarin 项目级别,以便它们位于根捆绑包中。我可以通过查看 Xamarin 项目中的 <BundleResources> 选项来使这更加清晰 - https://developer.xamarin.com/guides/ios/application_fundamentals/working_with_resources/ - rideintothesun

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接