Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set a launch screen image in Xcode

I am working on a iPhone App and I am trying to set a launch screen image. How can I set a launch screen image, is it possible to add a UIImageView and assign it a image?

If you need more information to answer the question then please let me know.

Thanks in advance

enter image description here

like image 634
Skywalker Avatar asked Jun 24 '15 11:06

Skywalker


People also ask

How do I create a launch screen in Swift?

Adding a Launch Screen in Swift Projects. A launch screen is the very first screen presented to users when your app starts up. When you create a new project with UIKit, Xcode automatically generates a storyboard file named LaunchScreen. storyboard for developers to design the launch screen of the app.

How do I change my launch screen?

Choose File > New > File. Under User Interface, select Launch Screen, and click Next. Give the launch screen file a name, choose a location, select the target that you want to add the file to, and click Create. In the settings for your target, select the General tab and find the “App Icons and Launch Images” section.


1 Answers

Yes, you can easily set a UIImageView in the LaunchScreen. Simply delete the pre-existing labels from the LaunchScreen.xib, add a UIImageView from the Interface Builder. Assign the following 4 constraints to that UIImageView with respect to the parent view:

  • Bottom Space to container
  • Top Space to container
  • Leading Space to Container
  • Trailing Space to Container

And finally set the image to the UIImageView.

Hope this helps you in what you wanted to do.

Update:

Have a look at the following image for further description:

like image 197
danialzahid94 Avatar answered Sep 20 '22 17:09

danialzahid94