|
Adds multiple constraints on the layout of the receiving view or its subviews. | |
|
All constraints must involve only views that are within scope of the receiving view. Specifically, any views involved must be either the receiving view itself, or a subview of the receiving view. Constraints that are added to a view are said to be held by that view. The coordinate system used when evaluating each constraint is the coordinate system of the view that holds the constraint. When developing for iOS 8.0 or later, use the NSLayoutConstraint class’s activateConstraints: method instead of calling the addConstraints: method directly. The activateConstraints: method automatically adds the constraints to the correct views. |
转载于:https://www.cnblogs.com/feng9exe/p/6648828.html
本文介绍了如何为接收视图及其子视图添加多个布局约束。约束必须只涉及接收视图范围内的视图,并且当使用iOS 8.0或更高版本开发时,推荐使用NSLayoutConstraint类的activateConstraints:方法来自动将约束添加到正确的视图。
1907

被折叠的 条评论
为什么被折叠?



