我有一个故事板文件,其中添加了一个 UITableView 和一个 UIView。UIView 是我尝试制作一个自定义标题,它将是半透明的,因此 tableview 将通过它可见(我不确定这是否可能,因为我是新手,这是我的第一个 iPhone 应用程序)。
在处理了与我的 ViewController 类的所有连接后,当我运行代码时,我给了我这个错误:
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)
(
"<NSAutoresizingMaskLayoutConstraint:0x8988060 h=--& v=--& V:[UIView:0x7574100(460)]>",
"<NSLayoutConstraint:0x7574780 V:|-(0)-[UIView:0x75742b0] (Names: '|':UIView:0x7574100 )>",
"<NSLayoutConstraint:0x7574700 V:[UIView:0x75742b0]-(494)-| (Names: '|':UIView:0x7574100)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7574700 V:[UIView:0x75742b0]-(494)-| (Names: '|':UIView:0x7574100 )>
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.
关于为什么会发生这种情况的任何想法都会有所帮助。谢谢。