简体   繁体   中英

How to use launch image set in UIImageView iOS?

I have some issues with the launch screen images, when the app is started. I currently using the default image set that contains the @1,2,3x images, but I figured out that there is also an Launch Image Set. This will solve also the problem of different iPhone sizes with the export for multiple screen resolutions. But after uploaded the correct images to the launch image set, I can't select them within an UIImageView in the launch storyboard. Is this even possible and if so, how can I use that in storyboards? Or is there another way to do this?

I cycle through an x amount of images that will randomly display when opening the application. So every time you open the app, it will display another image.

You can't use launch images in the rest of your storyboards. You should create a normal image set to use in the rest of your app and use constraints to get it to adjust size to whatever device the app runs on.

The launch image is shown while your app is loading ("launched", loaded to memory). So you can not run any code at this time.

As the launch time is not that long, a common approach is to initially show a view, that looks 100% identical to the actual launch screen for 3 seconds or so. So you can do run code, animations or such there.

In my personal user experience this is an ugly approach, as you let the user wait for no reason but to show of you CI.

To sum it up: You can not have a random initial launch screen.

Find more information about how to actually setup a launch screen in this answer .

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