简体   繁体   中英

LaunchScreen.xib single image for all devices?

I'm using the current Xcode and targeting iOS 8.

I'm wondering if it's okay if in my LaunchScreen.xib I put a single imageView that is constrained to all sides of the parent container. Within that image view will be my splash image called: splash.png;

Now here's the kicker, this splash.png will be hi-res and all devices (iPhone/iPad) will use this one image. Is this ok according to apple's guidelines? (note: it's okay with me) I don't mind if it stretches to fit). Also note my app's only in portrait.

Yes. It's fine, that's because they introduced this new feature ( launchscreen.xib ).

For deployment targets prior to iOS 8, you add a set of launch images to an asset catalog for each of the possible screen sizes.

New projects are created with a launch screen file called LaunchScreen.xib. Alternately, you can create a new launch screen file using File > New, selecting the User Interface category, and choosing a file type of Launch Screen. The launch screen uses size classes to adapt to different screen sizes and orientations, see Adapt to Multiple iOS Screen Sizes and Orientations with Size Classes for more information.

Reference : Create and Set the iOS Launch Images or Launch Screen File

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