Unable to simultaneously satisfy constraints.

2018-07-04 11:16:05.379131+0800 JDD[18217:10684181] [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. (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 constraintMake a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in may also be helpful.

Legend:

* - is laid out with auto layout

+ - is laid out manually, but is represented in the layout engine because translatesAutoresizingMaskIntoConstraints = YES

• - layout engine host


查找:

ObjC项目添加 po [[UIWindow keyWindow] _autolayoutTrace]

或者为你的Swift项目添加 expr -l objc++ -O -- [[UIWindow keyWindow] _autolayoutTrace]


解决:

xView.translatesAutoresizingMaskIntoConstraints=NO;

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容