LayoutConstrain 心法口诀

心法口诀
  • "哪个控件"的“什么属性””等于“”另一个控件“的”什么属性“乘以”多少“ 加上”多少“
      let widthCons = NSLayoutConstraint(item: messageLab, attribute: NSLayoutAttribute.Width, relatedBy: NSLayoutRelation.Equal, toItem: nil, attribute: NSLayoutAttribute .NotAnAttribute, multiplier: 1.0, constant: 224)
        addConstraint(widthCons)

你可能感兴趣的:(LayoutConstrain 心法口诀)