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?
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.
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.
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.
UILayoutGuide
is not available from Interface Builder yet. Please file a radar at https://bugreport.apple.com to request that Apple add support.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With