Reputation: 23094
Here is a screenshot:
As you can see, the leading space to superview is set at 0, but there is a gap between the superview margin and the UIView. Why is that and how can I make the leading space really 0?
The same goes for trailing space, by the way.
Upvotes: 2
Views: 306
Reputation: 1915
Select (double click) the constraint. Tap the selector for the superview
item, and uncheck Relative to margin
Upvotes: 3
Reputation: 2540
Pls, uncheck Constraint to margin Checkbox in Add New Constraints Dialog before give the Constraints like this :
Upvotes: 1
Reputation: 3219
I am sure that you have not uncheck Constrain to Margin
checkbox while adding leading or trailing constraint.
Remove that constraint add it agin without checkbox:
OR
Select leading constraint and in size inspector
remove check of Relative to margin
in second item
.
Upvotes: 1