在使用自動(dòng)布局時(shí),能正常運(yùn)行,但是控制臺不斷的報(bào)下面的錯(cuò)誤:
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:0x7fe5d0557c80 V:[UIView:0x7fe5d0571ab0(224)]>", "<NSLayoutConstraint:0x7fe5d055b940 UIView:0x7fe5d0571ab0.width == 1.42857*UIView:0x7fe5d0571ab0.height>", "<NSLayoutConstraint:0x7fe5d05612e0 H:|-(0)-[UIView:0x7fe5d0571ab0]? (Names: '|':UIView:0x7fe5d055c790 )>",
Will attempt to recover by breaking constraintMake a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.The methods in the UIConstraintBasedLayoutDebugging category on UIView listed inmay also be helpful
解決方法:
Lable的問題胚宦,Label所有constraint刪除就不報(bào)錯(cuò),有些其實(shí)并不沖突,但是可以全部都刪除,然后自動(dòng)更新钠右,問題就解決了,一晚上都在嘗試忘蟹,希望能幫到你飒房!
NSLayoutConstraint? 控制臺打印出來幾條,就說明有幾處有問題寒瓦。
?