NSLayoutEquations严重地说:它只是y=mx+b。那么为什么平均NSLayoutConstraint的初始化需要200多个字符呢? 添加两个新方法:* +[NSLayoutConstraint constraintWithFormula:LHS:RHS:] * -[UIView constrain:to:] 让自动布局像一句话一样简单。许可证: MITObjective C