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

一、实现效果:

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

二、注意点:

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

三、官方描述:

【iOS开发】launch Images启动图片设置(UILaunchImageFile)之002_第1张图片

四、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:
[email protected] (old 640x1136 ~ for iPhone 5)

4.0 inch screen:
[email protected] (new 640x1136 ~ for iPhone 5)

4.7 inch screen:
[email protected] (750x1334 ~ for iPhone 6)

5.5 inch screen:
[email protected] (1242x2208 ~ for iPhone 6 Plus Portrait)
5.5 inch screen:
[email protected] (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

http://blog.csdn.net/ouyangtianhan/article/details/42262161

http://www.cnblogs.com/ADaii/archive/2013/01/14/2860444.html

上一篇:【iOS开发】使用Xcode8 添加Launch Image(启动图片)之001

你可能感兴趣的:(Objective-C)