How to remove margin from a viewController?

前端 未结 2 2073
独厮守ぢ
独厮守ぢ 2021-01-06 15:23

I have created a new project using storyboard. Now, I want to add a UIView into the default ViewController. When I tried to add constraint using AutoLayout to the UIView wit

相关标签:
2条回答
  • 2021-01-06 15:45

    to remove constrain margin from the constrain follow this step

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

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

    3 . In the inspector bar, click the Size Inspector button

    4 . Scroll the inspector pane until you find the Constraints list

    1. To edit constraints, double–click a constraint in the list.

    Xcode opens the constraint definition in the inspector.

    6 . choose the item which has extension .margin

    7 . Then remove the tick form Relative to margin

    8 . Done

    0 讨论(0)
  • 2021-01-06 15:50

    just remove constraints to margin option ..

    enter image description here

    0 讨论(0)
提交回复
热议问题