How can I remove a field from a viewController?

I created a new project using storyboard. Now I want to add a UIView to the standard ViewController. When I tried to add constraint using AutoLayout to UIView with its parent ViewController, it displays -16 instead of 0 in both leading and trailing spaces. Which makes the UIView smaller than the default width of the UIViewController. How can I remove this? Please, help.

+3


source to share


2 answers


just remove the constraints for the margin parameter.



enter image description here

+17


source


to remove the account assignment boundary from the restriction, follow the next step

1. In Interface Builder, select an item by clicking it in the diagram view or on the canvas

2. Open the Utilities pane for the workspace window by clicking the Show Utilities button in the workspace configuration buttons on the toolbar.

3. In the inspector panel, click the "Size Inspector" button

4. Scroll through the inspector panel until you find the list of restrictions



  1. To change the constraints, double-click the constraint in the list.

Xcode opens the constraint definition in the inspector.

6.select the element with the extension .margin

7. Then remove the check box against the field

8. Done

+1


source







All Articles