Swift: Animation code on LaunchScreen

9.2k views Asked by At

I want to rotate an app logo on my Launch Screen (LaunchScreen.storyboard).

This link helps me in getting the code to rotate an image. However, where can I put this code?

Since there is no class file associated with the Launch Screen, how can I acheive this?

2

There are 2 answers

0
Tamás Sengel On BEST ANSWER

You can't directly do that as the launch screen is static. Even if it's set up via a .xib or a storyboard file, it will appear as a snapshot of the initial state of that scene.

You should create a view controller with the same look as your launch screen and animate that.

0
Orkhan Alikhanov On

You can't achieve that. Before LaunchScreen.storyboard you was putting only static images in order to be shown on launch. LaunchScreen.storyboard is introduced later to simplify the generation of static images.

But you can kind of workaround it. You display exactly same looking view controller just after launchscreen and run animation. But there will be a little delay.