Launch image or launch xib / storyboard?

2019-02-11 18:14发布

问题:

I'm trying to finish my first iOS app up for submission and I'm just getting really confused here. The documentation is telling me I need a launch image and giving me the dimensions for iPhone 6 and 6+ but then clearly says in a couple places that "The launch XIB or storyboard is required to support iPhone 6 sized apps."

I'm confused to no end here. Why am I including launch images if I need a "launch storyboard"? I haven't even figured out what a launch storyboard is yet...

回答1:

If you're developing with Xcode 6 and for iOS 8 exclusively, then you should use launch storyboards, which avoid the need to provide several launch images at different sizes.

This storyboard is automatically generated by Xcode 6 when starting a new project, but you might have been using an older project template.

See here for how to create a launch storyboard using Xcode 6: http://oleb.net/blog/2014/08/replacing-launch-images-with-storyboards/

Please note that you can also use a regular, "single" XIB file instead of a whole storyboard if you like. I think the Xcode 6 project templates use XIB files for that purpose.

Unfortunately, if your app is also targeting older versions of iOS (even iOS 7), you'll have no other option than also including launch images for all iPhone devices (except iPhone 6, which doesn't run these versions of iOS, obviously). This is a pain, but Apple made the right move by providing this new feature for future developments.



回答2:

From your comment under @Romain's answer,

So to support everything, I need both.

No, if you need to support everything, use launch images. If your app ships with launch images and use them to display launch screen, then no need to provide launch xib/storyboard. An app can only use one way to display launch screen.