ios – Autolayout约束警告“将尝试通过打破约束来恢复”
发布时间:2020-12-14 19:10:56 所属栏目:百科 来源:网络整理
导读:我正在尝试实施新闻提要(不知何故像没有评论或喜欢的Instagram).它工作,但 xcode继续显示此错误.我尝试改变所有约束,然而,我无法开始工作. tableview的高度为475,图像的高度为400,带有标签的白色区域为75. 我确实用过 self.tableView.estimatedRowHeight = 4
我正在尝试实施新闻提要(不知何故像没有评论或喜欢的Instagram).它工作,但
xcode继续显示此错误.我尝试改变所有约束,然而,我无法开始工作. tableview的高度为475,图像的高度为400,带有标签的白色区域为75.
我确实用过 self.tableView.estimatedRowHeight = 475; self.tableView.rowHeight = UITableViewAutomaticDimension; 有帮助吗? 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:0x174096530 UIImageView:0x1743e9000.top == UITableViewCellContentView:0x17418af80.topMargin + 13>","<NSLayoutConstraint:0x1740977f0 V:[PFImageView:0x1743e8e00]-(0)-| (Names: '|':UITableViewCellContentView:0x17418af80 )>","<NSLayoutConstraint:0x174097840 V:[UIImageView:0x1743e9000]-(24)-[PFImageView:0x1743e8e00]>","<NSLayoutConstraint:0x174097890 H:|-(0)-[PFImageView:0x1743e8e00] (Names: '|':UITableViewCellContentView:0x17418af80 )>","<NSLayoutConstraint:0x174097930 H:[PFImageView:0x1743e8e00]-(0)-| (Names: '|':UITableViewCellContentView:0x17418af80 )>","<NSLayoutConstraint:0x174097ac0 PFImageView:0x1743e8e00.width == PFImageView:0x1743e8e00.height>","<NSLayoutConstraint:0x174097b60 V:[UIImageView:0x1743e9000(30)]>","<NSLayoutConstraint:0x174092ed0 'UIView-Encapsulated-Layout-Width' H:[UITableViewCellContentView:0x17418af80(375)]>","<NSLayoutConstraint:0x174092f20 'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x17418af80(44)]>" ) Will attempt to recover by breaking constraint <NSLayoutConstraint:0x174097b60 V:[UIImageView:0x1743e9000(30)]> Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful. 解决方法
我实际上解决了从图像约束底部更改优先级到750的问题.感谢您的帮助.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
热点阅读