Layout:
1. Unable to simultaneously satisfy constraints.
2019-02-20 10:23:28.043637+0800 HYHY_iOS[327:14828] [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:0x280cea530 UIView:0x10ca72e10.height == 60 (active)>",
"<NSLayoutConstraint:0x280cea710 HYHY_iOS.JMTextfield:0x10ca73f70.height == 60 (active)>",
"<NSLayoutConstraint:0x280cea8f0 HYHY_iOS.JMTextfield:0x10ca78650.height == 60 (active)>",
"<NSLayoutConstraint:0x280ceaee0 UIView:0x10ca73d90.height == 30 (active)>",
"<NSLayoutConstraint:0x280c906e0 UIStackView:0x10ca72c10.height == 230 (active)>",
"<NSLayoutConstraint:0x280c91d10 'UISV-canvas-connection' UIStackView:0x10ca72c10.top == UIView:0x10ca72e10.top (active)>",
"<NSLayoutConstraint:0x280c91d60 'UISV-canvas-connection' V:[UIView:0x10ca73d90]-(0)-| (active, names: '|':UIStackView:0x10ca72c10 )>",
"<NSLayoutConstraint:0x280c91e00 'UISV-spacing' V:[UIView:0x10ca72e10]-(5)-[HYHY_iOS.JMTextfield:0x10ca73f70] (active)>",
"<NSLayoutConstraint:0x280c91e50 'UISV-spacing' V:[HYHY_iOS.JMTextfield:0x10ca73f70]-(5)-[HYHY_iOS.JMTextfield:0x10ca78650] (active)>",
"<NSLayoutConstraint:0x280c91f40 'UISV-spacing' V:[HYHY_iOS.JMTextfield:0x10ca78650]-(5)-[UIView:0x10ca73d90] (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x280cea8f0 HYHY_iOS.JMTextfield:0x10ca78650.height == 60 (active)>
Solved:
着重解决Will attempt to recover by breaking constraint
下面的约束,一般是和系统约束有冲突,把有问题的约束的priority(优先权) 调低,就可以解决问题了。放任不管也不会影响程序运行,但是这种错误警告越多,就会增加程序渲染速度阻塞主线程,出现卡顿
网友评论