简体   繁体   中英

iOS Objective-C: How to have both Launch xib file and static launch images in Xcode project?

We support all the iPhone and iPad models for our iOS application. Speaking on OS version support, we support iOS 6 and later.

As of now, we are using STATIC LAUNCH IMAGE FILES for the splash screen purpose. To be specific, we have added 13 different launch image files in images.xcassets to support the range of devices.

As everyone must be aware, Apple have moved forward with the concept of LAUNCH xib FILE from iOS 8 onwards. And they suggest to use the same specifically for iPhone 6/6S and iPhone 6 Plus/6S Plus. Below is the quote from HIG.

"Although it's best to use a launch file for iPhone 6 and iPhone 6 Plus, you can instead supply static launch images if necessary."

They also tell the point that, developers can use both static launch image and launch image file in one project. Below is the relevant quote from HIG.

"If you also need to support earlier versions of iOS, you can continue to supply static launch images in addition to a launch file."

Keeping in the point in mind that we need to support iOS 6 onwards, we need to have both static launch images (which we already have) and dynamic launch xib file (which we need to add). But, how do we keep both the things together in our project? And how does it really work? Any help on this will be greatly appreciated.

All I had to do to support both of these things in my project was migrate to the .xib file and just leave the launch images in the project. It's easy to test that it still works with an iOS 7 device or simulator.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM