Nilu Thimmareddy
Nilu Thimmareddy

Reputation: 11

How to remove Launch screen from project in iOS?

I want to remove the launch screen from my project because I want to add a GIF image as a launch screen. I tried to set Main.Storyboard as Launch screen file in target but it is not working.

Upvotes: 1

Views: 4222

Answers (4)

Atmaram
Atmaram

Reputation: 634

As you cannot set Gif image directly to launchscreen storyboard Try this way

  1. Take first frame of your gif image as png and set it on the LaunchScreen storyboard.
  2. Then in the next view controller to be shown after the LaunchScreen storyboard, create a view, put imageview in it and show gif image in it , it should be the same size as the image in your LaunchScreen storyboard.

Please refer this link https://github.com/kirualex/SwiftyGif Nice example is given here to show gif image in UIImageView.

Upvotes: 1

AjinkyaSharma
AjinkyaSharma

Reputation: 1979

You will have to follow the same solution as rmaddy suggested. You will have to add a viewController which shows you animation, before you show your main storyboard, or your first viewcontroller whatever it is.

What you can do it, you can set an image which is identical to the first frame of your gif, as your default launch screen, so that it looks like there is an animation on the launch screen, when you show your gif containing launch screen.

Hope you get it.

Upvotes: 1

Andy Darwin
Andy Darwin

Reputation: 478

You can try Uber.

I have no idea how to remove the launch screen, but you can make the launch screen looks same as the first frame of your gif. After the static launch screen disappear, you can start your GIF.

Here is a video I take. Video

Upvotes: 0

rmaddy
rmaddy

Reputation: 318814

You don't remove the launch screen. You must have a standard, static launch screen storyboard. It's used before your app is even running. You can't change that.

Add whatever static image you want to the launch screen.

If you need anything dynamic that you wish to show before the main storyboard is shown then you need to show it on your main storyboard or some other storyboard/root view controller you want to show before the main storyboard (but after the launch storyboard).

But do your users a favor and don't do anything that delays their ability to start using your app.

Upvotes: 6

Related Questions