Launch Screen that behaves exactly like Launch Image

前端 未结 5 2052
慢半拍i
慢半拍i 2020-12-29 04:04

In order to get iPad Pro to use full resolution at launch, we have to use a Launch Screen File.

I\'ve never used a Launch Screen XIB/Storyboard before, because my ap

5条回答
  •  别那么骄傲
    2020-12-29 04:54

    1. First create all your images. Then, open up your asset catalog and right click -> App Icons & Launch Images -> New iOS Launch Image. This will create an file to drag all your files into. Do that. Name the asset "Launch."

    2. Create a new launch screen storyboard with command-n. Choose iOS -> User Interface -> Launch Screen. Call the file "Launch Screen."

    3. In your Launch Screen storyboard, select the view controller's view

    [selecting the view.

    1. Find the UIImageView placeholder from the object library in the bottom corner of the right side ba, and drag it into the launch screen view.

    1. Now, select the image view in the storyboard, and type in the name of the image from your asset catalog.

    1. Control drag from the UIImageView to it's container view to set up auto layout constraints as follows :

    1. Optional... if you want it to look nice in your storyboard, select the view and do option-cmd-= to update the frame of the UIImageView.

    2. Go to your info.plist, and type the name of your storyboard ("Launch Screen") for the key "Launch screen interface file base name"

    3. Clean and run.

    Hope that helps and that I didn't forget anything!

提交回复
热议问题