Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to create UILayoutGuide in interface builder?

Tags:

ios

swift

I want to create a UILayoutGuide in Interface Builder. I can create UILayoutGuide in code. I am using Xcode 7 beta.

How can I create a UILayoutGuide in Interface Builder?

like image 220
myUser Avatar asked Jul 21 '15 09:07

myUser


People also ask

How do I add a top layout guide?

In Figure 1: You can see constraint to Top Layout Guide and it will take statusbar as a base. Show activity on this post. Go to View Controller in interface Builder. And Click Show the attributes inspector and then Select Status Bar as Defaults Both will be same.

How do you set constraints?

To create a constraint between two views, Control-click one of the views and drag to the other. When you release the mouse, Interface Builder displays a HUD menu with a list of possible constraints.

How do I create a constraint in Xcode?

To create constraints select the button and click the Align icon in the auto layout menu. A popover menu will appear, check both “Horizontal in container” and “Vertically in container” options to center the button on the screen. Then click the “Add 2 Constraints” button. Run the application.


1 Answers

UILayoutGuide is not available from Interface Builder yet. Please file a radar at https://bugreport.apple.com to request that Apple add support.

like image 89
Jerry Avatar answered Sep 22 '22 06:09

Jerry