快速定位约束以及解决⽅法
错写成width语法错误报错
Asrtionfailurein-[MASViewConstraintaddConstraintWithLayoutAttribute:],MASViewConstraint.m:213
2021-02-2516:30:12.261136+0800Masonry[47431:9690200]***Terminatingappduetouncaughtexception
'NSInternalInconsistencyException',reason:'Attributesshouldbechainedbeforedefiningtheconstraintrelation'
o后⾯关联的view⾮同级视图或⾮者⽗视图报错
Asrtionfailurein-[MASViewConstrainttSecondViewAttribute:],MASViewConstraint.m:135
2021-02-2516:33:20.327230+0800Masonry[48246:9697968]***Terminatingappduetouncaughtexception
'NSInternalInconsistencyException',reason:'attemptingtoaddunsupportedattribute:'
3.不能同时满⾜约束条件。报错
[LayoutConstraints]Unabletosimultaneouslysatisfyconstraints.
_equalTo(UIEdgeIntsMake(10,10,10,10));可以都为正数
o().(-10);负数
o().(-10);负数
1.可以添加优先级解决2.删掉有冲突的约束3.检查⽗视图width或⾼是否为0
断点定位约束冲突控件
symobol:UIViewAlertForUnsatisfiableConstraints
debuggercommand:po[[[UIApplicationsharedApplication]windows].firstObjectrecursiveDescription]
或po[[UIWindowkeyWindow]_autolayoutTrace]po[[UIWindowkeyWindow]_autolayoutTrace]
本文发布于:2023-01-03 09:14:11,感谢您对本站的认可!
本文链接:http://www.wtabcd.cn/fanwen/fan/90/83488.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |