I have a custom UITableViewCell which has a thumbnail and bunch of text. The row height is configured to be calculated automatically using
tableView.estimat
This warning is telling you there's a conflict in your constraints. Reduce the priority of the height constraint to 999 and it will go away. Tested it in your Github project and worked perfectly.
The warning is telling you exactly what the problem is, but you may not realize it. The first three constraints are for a 90 pixel-high image that's 20 pixels below the top of its container, and 20 pixels above its container's bottom margin. That's 130, and that's not compatible with the fourth constraint, which wants a total height of 138. However, because the bottom edge constraint is relative to the container's margin, that adds a certain number of pixels more. Either remove the total height constraint (my recommendation), or change the top and bottom edge amounts.
0.333 on a 3x scale display (which iPhone 6+ is) is probably connected with the cell separator.
Note that your constraints don't set up the size of the cell, they set up the size of the contentView
. But the cell has to add 2 pixels (= 0.666 points) to the cell height for the cell separator. Autolayout tries to keep view positions on integer boundaries so adding 0.666points to the cell height can result in adding 0.333 to your content height.
You can avoid the error by setting your table separators to None
. Although setting up one of the priorities to 999 (usually the bottom priority) as the other answer has suggested is a good solution in general.