在IB中,我在我的UIButton上设置了宽度/高度限制。我已经验证在viewDidLoad中约束是正确的。在该行的某处,按钮添加了冲突约束(在viewWillLayoutSubviews中验证)。如何找出添加布局约束的时间以及由谁添加?将约束添加到控件/视图时是否会触发回调?
在viewDidLoad中:
<__NSArrayM 0x7fb145023f90>(
<NSLayoutConstraint:0x7fb140a8aec0 H:[UIButton:0x7fb145194430'X'(44)]>,
<NSLayoutConstraint:0x7fb140a8af10 V:[UIButton:0x7fb145194430'X'(44)]>
)
在viewWillLayoutSubviews中:
<__NSArrayM 0x7fb140aee6c0>(
<NSLayoutConstraint:0x7fb140a8aec0 H:[UIButton:0x7fb145194430'X'(44)]>,
<NSLayoutConstraint:0x7fb140a8af10 V:[UIButton:0x7fb145194430'X'(44)]>,
<NSLayoutConstraint:0x7fb140bd2e60 H:[UIButton:0x7fb145194430'X'(40)]>,
<NSLayoutConstraint:0x7fb145155ea0 V:[UIButton:0x7fb145194430'X'(40)]>
)