In general, the constraints must define both the size and the position of each view.
一般来讲,约束必须同时定义每个视图的尺寸和位置。
So far, all of the examples have used constraints to define both the view's position and its size.
到目前为止,所有的示例都使用约束来定义视图的位置和它的尺寸。
Both the width and trailing edge's position can then be calculated based on the superview's size and the other constraints.
然后,视图的宽度和结束边界位置都可以根据父视图的尺寸计算出来,其它约束也是。
应用推荐