简体   繁体   中英

Setting different LaunchImage in LaunchScreen.storyboard

I've got a set of LaunchImages in various sizes in my Assets.xcassets folder. I've created it by right-clicking in Assets.xcassets -> App Icons & Launch Images -> New iOS Launch Image , and put all the differently sized images inside every box.

iPads with 9.7" (or more) screen size need to have a different launch image from the iPhones.

I've been using LaunchScreen.storyboard to display the LaunchImage, with proper constraints. But only the iPhone version is displayed on the Simulator (and badly strecthed out).

我的LaunchScreen.storyboard

Is there any way to make iOS choose the proper LaunchImage from the set?

Apparently LaunchScreen.storyboard has issues with using .launchimage image sets, but not with .imageset extension.

I've resolved it by not using the .launchimage file in Assets.xcassets , but by creating a New Image Set , and then just using two resolution files, one for iPhones and one for iPads.

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