AutoLayout正在添加一个NSAutoresizingMaskLayoutConstraint,该约束会导致冲突,目前尚不清楚冲突发生在何处以及如何发生。
自动布局日志已编号。自动布局日志中没有显示Xcode标签。
Post View Cell
,这是一种习惯
UICollectionViewCell
.
然而
sizeForItemAt
UICollectionViewDelegate函数不返回此值。如果将返回值硬编码为
CGSize(width: 300, height: 100)
,293仍出现在日志中。
那么293是从哪里来的呢?
第2行是代码中设置的约束,这是正确的值。此视图应为
Attachment View
第3行(&A);4参考
Post Content View
UIStackView
.
第5行是指
Text View
第6行是指
附件视图
第7行是由
UIStackView
(
发布内容视图
1. "<NSAutoresizingMaskLayoutConstraint:0x600002a47610 h=--& v=--& UIView:0x7facf0e126b0.height == 293 (active)>",
2. "<NSLayoutConstraint:0x600002a79a40 UIView:0x7facf0e07110.height == 280 (active)>",
3. "<NSLayoutConstraint:0x600002a785a0 V:[UIStackView:0x7facf0e12890]-(10)-| (active, names: '|':UIView:0x7facf0e126b0 )>",
4. "<NSLayoutConstraint:0x600002a79180 V:|-(10)-[UIStackView:0x7facf0e12890] (active, names: '|':UIView:0x7facf0e126b0 )>",
5. "<NSLayoutConstraint:0x600002a7cff0 'UISV-canvas-connection' UIStackView:0x7facf0e12890.top == UITextView:0x7facf283a600'hi'.top (active)>",
6. "<NSLayoutConstraint:0x600002a7cf00 'UISV-canvas-connection' V:[UIView:0x7facf0e07110]-(0)-| (active, names: '|':UIStackView:0x7facf0e12890 )>",
7. "<NSLayoutConstraint:0x600002a7d270 'UISV-spacing' V:[UITextView:0x7facf283a600'hi']-(5)-[UIView:0x7facf0e07110] (active)>"
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600002a79a40 UIView:0x7facf0e07110.height == 280 (active)>