View+MASAdditions (入口)
- 定义约束条件:
- 构建约束: mas_makeConstraints, mas_updateConstraints, mas_remakeConstraints
- 查找公共父视图:mas_closestCommonSuperview
MASConstraintMaker
- addConstraintWithLayoutAttribute (使用点方法添加约束 MASViewConstraint)
- install (安装所有约束) -> [MASViewConstraint install]
MASViewConstraint
- firstViewAttribute (MASViewAttribute)
- secondViewAttribute (MASViewAttribute)
- install:[self.installView(commonSuperView) addConstraint:MASViewConstraint] (为对应的view安装单个约束)
MASViewAttribute
- layoutAttribute (NSLayoutAttribute)
- relatedView (UIView)
MASLayoutConstraint : NSLayoutConstraint
[MASLayoutConstraint constraintWithItem:firstView (约束的创建)
attribute:firstViewAttribute
relatedBy:self.layoutRelation
toItem:secondView
attribute:secondViewAttribute
multiplier:self.layoutMultiplier
constant:self.layoutConstant]
网友评论