@
kera0a 我现在改了一种方式,就是在 setModal 里,开始就把缓存里的约束,也就是上一个 cell 可能已经设置了的约束 deactivate 掉,怎么滚都显示对了,然后还是报下面的错
Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<SnapKit.LayoutConstraint:
[email protected]#110 \U00c1\U00c6\U00c4\U00ca\U220f\U220f.UIView:0x7faac0e43ce0.left == UITableViewCellContentView:0x7faac0c34920.left + 10.0>",
"<SnapKit.LayoutConstraint:
[email protected]#110 \U00c1\U00c6\U00c4\U00ca\U220f\U220f.UIView:
0x7faac0e43ce0.top == UITableViewCellContentView:
0x7faac0c34920.top + 10.0>",
"<SnapKit.LayoutConstraint:
[email protected]#111 \U00c1\U00c6\U00c4\U00ca\U220f\U220f.UIView:0x7faac0e43ce0.width == 40.0>",
"<SnapKit.LayoutConstraint:
[email protected]#122 UILabel:0x7faac0e3a1e0.left == \U00c1\U00c6\U00c4\U00ca\U220f\U220f.UIView:0x7faac0e43ce0.right + 10.0>",
"<SnapKit.LayoutConstraint:
[email protected]#123 UILabel:
0x7faac0e3a1e0.top == \U00c1\U00c6\U00c4\U00ca\U220f\U220f.UIView:
0x7faac0e43ce0.top>",
"<SnapKit.LayoutConstraint:
[email protected]#127 UILabel:0x7faac0e3a360.left == UILabel:0x7faac0e3a1e0.left>",
"<SnapKit.LayoutConstraint:
[email protected]#136 \U00c1\U00c6\U00c4\U00ca\U220f\U220f.ImageCell:0x7faac0e445d0.left == UILabel:0x7faac0e3a360.left>",
"<SnapKit.LayoutConstraint:
[email protected]#137 \U00c1\U00c6\U00c4\U00ca\U220f\U220f.ImageCell:0x7faac0e445d0.right == UITableViewCellContentView:0x7faac0c34920.right>",
"<SnapKit.LayoutConstraint:
[email protected]#147 UILabel:0x7faac0e3ec10.bottom == UITableViewCellContentView:0x7faac0c34920.bottom - 10.0>",
"<NSLayoutConstraint:0x7faac0d77800 'UIView-Encapsulated-Layout-Width' H:[UITableViewCellContentView:0x7faac0c34920(375)]>",
"<NSLayoutConstraint:0x7faac0d77ae0 'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x7faac0c34920(87.22)]>",
"<SnapKit.LayoutConstraint:
[email protected]#60 UIView:0x7faac0f300d0.height == \U00c1\U00c6\U00c4\U00ca\U220f\U220f.ImageCell:0x7faac0e445d0.width * 0.333333343267441 - 10.0>",
"<SnapKit.LayoutConstraint:
[email protected]#78 UIView:
0x7faac0f300d0.top == \U00c1\U00c6\U00c4\U00ca\U220f\U220f.ImageCell:
0x7faac0e445d0.top>",
"<SnapKit.LayoutConstraint:
[email protected]#84 UIView:0x7faac0f300d0.bottom == \U00c1\U00c6\U00c4\U00ca\U220f\U220f.ImageCell:0x7faac0e445d0.bottom>",
"<SnapKit.LayoutConstraint:
[email protected]#226 \U00c1\U00c6\U00c4\U00ca\U220f\U220f.ImageCell:
0x7faac0e445d0.top == UILabel:0x7faac0e3a1e0.bottom + 10.0>",
"<SnapKit.LayoutConstraint:
[email protected]#270 UILabel:
0x7faac0e3ec10.top == \U00c1\U00c6\U00c4\U00ca\U220f\U220f.ImageCell:0x7faac0e445d0.bottom + 10.0>"
)
Will attempt to recover by breaking constraint
<SnapKit.LayoutConstraint:
[email protected]#84 UIView:0x7faac0f300d0.bottom == 简游.ImageCell:0x7faac0e445d0.bottom>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.