错误原因:
在使用自动布局时,不断的报下面的错误: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初始化控件即可。
网友评论