Reputation: 7359
If I tap on a label and add constraints they will appear as nested in the left menu. But when I do the same thing to the button, the constraints are not nested in the button's view tree. Am I doing something wrong?
Upvotes: 0
Views: 136
Reputation: 38238
So, to take a few of your examples:
The constraints on the Hello label are height and width constraints, and involve only the label itself. Therefore the closest ancestor is the label itself, so that's where the constraints are.
The first Vertical Space constraint is between the Button and its containing View, so the closest ancestor of them both is the containing View.
The last Vertical Space constraint is between the Bottom Layout Guide and the Button. Their closest common ancestor is the containing View, so that's where the constraint lives.
Upvotes: 2