Is it possible to make a UIView to splash screen

2019-06-07 23:26发布

问题:

Is it possible to make a UIViewController or UIView type class as a splash screen ? Basically I want an animated splash screen for my app.

回答1:

You can do it.

 1. First create any UIViewController or UIView
 2. Click project Targets(Click your project-Left side->It shows Project and Targets options)
 3. Click General
 4. Select App Icons and Launch Images
 5. Choose Launch Screen File
 6. Click Drop Down of Launch Screen File
 7. Then Choose your required view controller which sets as splash screen 


回答2:

Yes it is possible to make any Viewcontroller as a Splash screen.

Take your ViewController as a initial view then implement one method and call it with method :

[self performSelector:@selector(yourMethodName) withObject:yourObject afterDelay:duration];

then in your Method you can navigate to next ViewController.



回答3:

Yes I got the solution, just change the Launch Screen File from Launchscreen.xib to Main.stroryboard under target. Now it's working.