简体   繁体   中英

Unable to set Auto Layout constraints for Launch Screen in Xcode

I am trying to set up a launching screen for my app, but when I add any UI element to the view controller in the launch screen storyboard, I don't see any option for setting constraints like in the main storyboard.

What can be the possible cause?

Yes, you missed to check that checkmark box . For those who are facing same issue, following are the steps to enable Auto layout for Launch screen :

1) Select the launch screen view controller icon:

在此处输入图片说明

2) Go to the "File Inspector" on right panel:

在此处输入图片说明

3) Check the box saying "Use Auto layout" :

在此处输入图片说明

You'll be now able to set auto layout constraints to launch screen.

Open LaunchScreen.storyboard , and in the left pane CTRL+Drag the first components you want to participate to the second component, and use the opened pop-up window:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM