錯誤原因:
在使用自動布局時,不斷的報下面的錯誤: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) (? ? "",? ? "",? ? "",? ? "",? ? "")Will attempt to recover by breaking constraintBreak on objc_exception_throw to catch this in the debugger.The methods in the UIConstraintBasedLayoutDebugging category on UIView listed inmay also be helpful.
可能出錯原因:
1,你的約束的確設置錯誤;
2,忘記設置控件的:setTranslatesAutoresizingMaskIntoConstraints 等于NO 。
3,騷年,快回頭看看你的代碼,是不是哪里手懶,沒用alloc初始化,用的是new啊,改回alloc初始化控件即可。