我已将80x80的自定义UIView
放入具有以下约束的自定义UITableViewCell
中。
内容视图的高度为80,而安全区域和总体UITableViewCell
的高度为80.5,这可能是单元格之间的界线。 Xcode在构建过程中不会抱怨。我没有在应用程序的其他地方设置任何其他硬编码的约束。
尽管在运行时看起来似乎不正确,但在运行时仍存在冲突:
[LayoutConstraints] 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.
(
"<NSLayoutConstraint:0x283f60190 WindDirectionIndicator:0x104f32ac0.height == 80 (active)>",
"<NSLayoutConstraint:0x283f60230 V:[WindDirectionIndicator:0x104f32ac0]-(0)-| (active, names: '|':UITableViewCellContentView:0x104f326d0 )>",
"<NSLayoutConstraint:0x283f60280 V:|-(0)-[WindDirectionIndicator:0x104f32ac0] (active, names: '|':UITableViewCellContentView:0x104f326d0 )>",
"<NSLayoutConstraint:0x283f60550 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x104f326d0.height == 80 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x283f60190 WindDirectionIndicator:0x104f32ac0.height == 80 (active)>
似乎同意边界位于顶部和底部,并且单元格和UIView均为80高。我在这里想念什么?