15. 如何快速定位哪个 View 出现了约束警告?
[
<MASLayoutConstraint:0x1492211d0 UILabel:0x147f56930.right == UITableViewCellContentView:0x147d35140.right - 20>,
<MASLayoutConstraint:0x147f529a0 UIButton:0x149222b60.right == UITableViewCellContentView:0x147d35140.right - 20>,
<MASLayoutConstraint:0x147f3dbf0 UILabel:0x147f56930.right == UIButton:0x149222b60.right - 20>
]
Will attempt to recover by breaking constraint
<MASLayoutConstraint:0x147f529a0 UIButton:0x149222b60.right == UITableViewCellContentView:0x147d35140.right - 20>[
Label1 距离 Cell1 的右边为 20
<Label1.right == Cell1.right - 20>,
Button1 距离 Cell1 的右边为 20
<Button1.right == Cell1.right - 20>,
Label1 距离 Button1 的右边为 20
<Label1.right == Button1.right - 20>
]
通过移除下面这个约束来纠正约束
<Button1.right == Cell1.right - 20>Last updated
Was this helpful?