有時候,我不斷收到這樣的錯誤,這些 - 沒有任何提示到的TextView或按鈕是指:如何找到崩潰約束?
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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x11d748d0 V:[UITextView:0xc1bb000(65)]>",
"<NSLayoutConstraint:0x11d77620 V:[UIButton:0x11d71cf0(44)]>",
"<NSLayoutConstraint:0x11d7be30 V:[UIButton:0x11d79e70(43)]>",
"<NSLayoutConstraint:0xa1980d0 V:|-(134)-[UITextView:0xc1bb000] (Names: '|':UIView:0xa1afba0)>",
"<NSLayoutConstraint:0xa199ed0 UITextView:0xc1bb000.centerY == UIButton:0x11d71cf0.centerY>",
"<NSLayoutConstraint:0xa199e50 V:[UIButton:0x11d79e70]-(61)-[UIButton:0x11d71cf0]>",
"<NSLayoutConstraint:0xa199cb0 V:|-(40)-[UIButton:0x11d79e70] (Names: '|':UIView:0xa1afba0)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x11d748d0 V:[UITextView:0xc1bb000(65)]>
Break on objc_exception_throw to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
有沒有一種方法,以確定在導致崩潰的代碼的限制?
文本:
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x11d748d0 V:[UITextView:0xc1bb000(65)]>
遺憾的是沒有太大的幫助,因爲我沒有任何想法,這約束,這是在代碼
可能重複的[無法同時滿足約束 - 沒有約束到位](http://stackoverflow.com/questions/14327145/unable-to-simultaneously-satisfy-constraints-no-constraints-in-place) - 在閱讀這些日誌時有幫助 – jrturton 2013-04-08 09:05:20