riciloma
riciloma

Reputation: 1844

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).

My LaunchScreen.storyboard

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

Upvotes: 1

Views: 884

Answers (1)

riciloma
riciloma

Reputation: 1844

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.

Upvotes: 1

Related Questions