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

在“graphics – >启动屏幕”一节中查看“苹果人员交互指南”,其中提供了以下有关静态启动屏幕图像的信息Apple HIG

“最好在启动屏幕上使用Xcode storyboard,但是如果需要的话,你可以提供一组静态图片,为不同的设备创build不同尺寸的静态图片,并确保包含状态栏区域。

然后列出了iOS 10中支持的所有设备。

有没有人知道如何做到这一点,例如12“的iPad Pro?在资产目录中无处添加图像。我是否需要在Info.plist文件中使用UILaunchImages数组?有一个例子。

提前致谢。

是的,你必须在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>