一、实现效果:

通过直接给图片起默认的名字,让app启动页自动加载启动图片。

二、注意点:

·图片命名一定要按苹果官方的指定规则命名,图片的像素也要符合规则;
·如果横竖屏图片都需要,记得在Xcode中勾选上项目支持横竖屏。

三、官方描述:

【iOS开发】launch Images启动图片设置(UILaunchImageFile)之002_默认图片

四、LaunchImage命名规则实例

https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/LaunchImages.html#//apple_ref/doc/uid/TP40006556-CH22-SW1

For iPhone 6
750 x 1334 (@2x) for portrait
1334 x 750 (@2x) for landscape

For iPhone 6 Plus:
1242 x 2208 (@3x) for portrait
2208 x 1242 (@3x) for landscape

4.0 inch screen:
Default-568h@2x.png (old 640x1136 ~ for iPhone 5)

4.0 inch screen:
LaunchImage-700-568h@2x.png (new 640x1136 ~ for iPhone 5)

4.7 inch screen:
LaunchImage-800-667h@2x.png (750x1334 ~ for iPhone 6)

5.5 inch screen:
LaunchImage-800-Portrait-736h@3x.png (1242x2208 ~ for iPhone 6 Plus Portrait)
5.5 inch screen:
LaunchImage-800-Landscape-736h@3x.png (2208x1242 ~ for iPhone 6 Plus Landscape)

Retina iPad:
Default-Portrait@2x~ipad.png (1536x2048 ~ for Retina iPad Portrait)

Retina iPad:
Default-Landscape@2x~ipad.png (2048x1536 ~ for Retina iPad Landscape)

iPad Mini/iPad:
Default-Portrait~ipad.png (768x1024 ~ for iPad Portrait)

iPad Mini/iPad:
Default-Landscape~ipad.png (1024x768 ~ for iPad Landscape)

参考地址:

https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html