如何在XCode 6.1中集成所有类型iPhone的启动画面? [英] How to integrate splash screen for all types of iPhones in XCode 6.1?

查看:127
本文介绍了如何在XCode 6.1中集成所有类型iPhone的启动画面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建和应用程序,它将在iPhone 4S,5,5S,6,6 +上运行,而depoloyment目标将是iOS 7.1。我看到Apple推出了LauchScreens.xib用于创建启动屏幕(Splash Screen),还有一个Image Assets,我可以在其中提供Launch Images屏幕。见下图:

I need to create and app which will run on iPhone 4S, 5,5S, 6, 6+ and the depoloyment target will be iOS 7.1. I saw Apple introduced LauchScreens.xib for creating the launch screen (Splash Screen) and also there is an Image Assets in which I can provide the Launch Images screens. See image below:

所以我的问题是如何在所有iPhone上使用启动画面?或者我应该说,当我使用XCode 6时,标准的方法是什么?

So my questions is how can I use the splash screen for all the iPhones? Or I should say, what is the standard way to to do that when I am using XCode 6?

我一直在寻找答案并阅读博客和Apple的文档为好吧,但我没有找到任何东西。一切都在唱自己的歌而不是答案。

I have been looking for the answers and reading blogs and Apple's Documents as well but I didn't find anything. Everything was singing its own song but not the answer.

推荐答案

Xcode6 中为所有设备启动画面你需要为每个设备大小的视网膜和非视网膜制作飞溅图像。

In Xcode6 for all devices splash screen you need to make splash image for each device size retina and non retina.

最好的方法是从目标使用资产目录 - >一般如下截图:

Best way of done this thng use asset Catalog from target-->general like following screenshot:

当您点击launchImage( - >)附近的右侧小箭头时,您可以看到以下窗口:

when you tap the right small arrow near of launchImage (->) you can see the following window:

目前有空,因为从右侧有没有选择任何目标,所以如果您的部署目标是6.0,您需要设置勾选标记,如下面的屏幕截图,以便您可以看到所有图像需要框:

Currently there is empty because from right side there is no any target selected so if your deployment target is 6.0 you need to set check mark like following screenshot so you can see the all image need box :

查看在目录中添加错误尺寸图像的时间,您可以在右上角收到警告,当您点按此警告时,您可以获得实际尺寸。请参阅以下屏幕截图:

See when you add wrong dimension image in catalog you can get warning at top right corner and when you tap on this warning you can get actually dimension. see the following screenshot for:

因此,从警告日志中,您可以知道哪个维度图像需要哪个启动画面。

So from the warning log you can know which dimension image need for which splash screen.

其他方式

无需使用Asses目录,无需使用 LaunchScreen.xib ,您仍然可以使用旧方式:

No need to use Asses Catalog and no need to use LaunchScreen.xib you can still use old way:

创建具有以下尺寸的初始屏幕图像:

create splash screen image with following size:

Default-568h.png                   320 x 568      
Default-568h@2x.png                640 x 1136
Default-667h@2x.png                750 x 1334
Default-736h@3x.png                1242 x 2208
Default.png                        320 x 480
Default@2x.png                     640 x 960

现在进入plist你需要添加以下数据:

Now in plist you need to add following data:


  • 通过点击(+)添加一行,其名为 UILaunchImages

  • Add one row by tap (+) its called UILaunchImages


  • 您需要填写此行,如下所示

这是不需要做任何事情希望答案有帮助也是其他人。

that's it no need to do any thing hope that answer helps to other as well.

这篇关于如何在XCode 6.1中集成所有类型iPhone的启动画面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆