Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
450 views
in Technique[技术] by (71.8m points)

ios8 - How to integrate splash screen for all types of iPhones in Xcode 6.1?

I need to create and app which will run on iPhone 4S, 5,5S, 6, 6+ and the deployment 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:

enter image description here

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?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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:

enter image description here

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

enter image description here

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 :

enter image description here

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:

enter image description here

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

Other way

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

Now in plist you need to add following data:

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

enter image description here

  • and you need to fill this row like following

enter image description here

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...