I\'m learning autolayout. I\'m currently adding a simple constraint: 0px margin between a view and it superview.
Apparently, there are two ways to add this constraint:
You've already given the answer. A constraint to the superview is not the same as a constraint to the superview's margin.
It might be easiest if you think about how you'd form these constraints in code. Here are the attributes you can use:
https://developer.apple.com/Library/ios/documentation/AppKit/Reference/NSLayoutConstraint_Class/index.html#//apple_ref/c/tdef/NSLayoutAttribute
As you can see, there is both Right and RightMargin. Pinning a subview's right edge to its superview's Right is not the same as pinning it to its superview's RightMargin.