2017-08-23 58 views
0

Tableview在iphone5中显示,但在iphone 5以外,我得到这个警告。有人知道这是什么警告?Autolayouts警告,无法同时满足约束

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. 
(
    "<NSLayoutConstraint:0x60800008a820 UIImageView:0x7f8193515be0.height == 0.75*UITableViewCellContentView:0x7f81935153f0.height - 21 (active)>", 
    "<NSLayoutConstraint:0x60800008d2a0 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7f81935153f0.height == 0.5 (active)>" 
) 

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x60800008d2a0 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7f81935153f0.height == 0.5 (active)> 
+1

可能重复[无法同时满足约束,将尝试通过打破约束来恢复](https://stackoverflow.com/questions/11664115/unable-to-simultaneously-satisfy-constraints-will-attempt-to-通过中断恢复) –

+0

请参阅以下相关链接 https://stackoverflow.com/a/36863042/8472539 https://stackoverflow.com/a/14327470/8472539 – Bin0li

回答

0

你有一个约束冲突,你可以通过给约束添加不同的优先级或者删除其中的一个来解决这个问题。 您也可以提供所有使用修复ID的视图,以取代“UIImageView:0x7f8193515be0.height”,它会显示'id name'.height。通过这种方式,您可以看到哪些视图遇到约束问题。 你应该学习自动布局,如果你不想再有这些问题...... AutoLayout guide

0

首先,尝试改变优先级每个高度限制在您的表视图细胞至少999.f 显然,你有一个高度限制的问题。

相关问题