0
点赞
收藏
分享

微信扫一扫

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


一、Assets.xcassets -> + -> App icons & Launch Images -> New iOS Launch Image

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

二、设置为Launch Image的图片,最好为 .png格式

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

三、单击工程名称 -> General -> Launch Images Source改为LaunchImage ->Launch Source File的内容置为空

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

四、将LaunchScreen.storyboard的设置中的Use as Launch Screen取消

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

五、此时运行就能看到Launch Image了,记得把之前装的app卸载掉。

六、效果图(ipad && iphone)

iPad 启动页面

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

iPhone 启动页面

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

七、如果感觉Launch Image显示的时间太短,可以在AppDelegate.m文件里面添加一行 延迟 代码:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // 延迟进入应用,避免应用启动过快,导致启动图片一闪而过
    [NSThread sleepForTimeInterval:3.0];
}

八、设备支持的启动图片尺寸大全

按照如下 设置Launch Image 尺寸

Device

Orientation&&System

Size

Launch Image

pixel

iPhone

Portrait iOS 5,6

Retina 4

LaunchImage@2x.png

640 × 1136 pixels

iPhone

Portrait iOS 7,8

Retina 4

LaunchImage@2x.png

640 × 1136 pixels

iPhone

Portrait iOS 8

Retina HD 5.5

LaunchImage@3x.png

1242 × 2208 pixels

iPhone

Portrait iOS 8

Retina HD 4.7

LaunchImage@2x.png

750 × 1334 pixels

iPhone

Portrait iOS 5,6

1x

LaunchImage.png

320 × 480 pixels

iPhone

Portrait iOS 5,6

2x

LaunchImage@2x.png

640 × 960 pixels

iPhone

Portrait iOS 7,8

2x

LaunchImage@2x.png

640 × 960 pixels

iPhone

Landscape iOS 8

Retina HD 5.5

LaunchImage@3x.png

2208 × 1242 pixels

iPad

Portrait iOS 7,8

1x

LaunchImage.png

768 × 1024 pixels

iPad

Portrait iOS 7,8

2x

LaunchImage@2x.png

1536 × 2048 pixels

iPad

Landscape iOS 7,8

1x

LaunchImage.png

1024 × 768 pixels

iPad

Landscape iOS 7,8

2x

LaunchImage@2x.png

1536 × 2048 pixels

下一篇:launch Images启动图片设置(UILaunchImageFile)之002


举报

相关推荐

0 条评论