I have a tableView with some static cells. It's set to automatically calculate the row height. The bottom most button is in a cell with a height constraint along with top, bottom, leading, and trailing. All constraints are done in the interface builder with no warnings or errors showing for the scene.
Yet I'm getting this warning when I run the app and display the scene:
2018-01-16 08:00:40.149994-0500 Reference App[9176:1864272] [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.
(
"<NSLayoutConstraint:0x7fd01dd16530 UIButton:0x7fd01dd171a0'Reset Data'.height == 44 (active)>",
"<NSLayoutConstraint:0x7fd01dd31860 V:|-(0)-[UIButton:0x7fd01dd171a0'Reset Data'] (active, names: '|':UITableViewCellContentView:0x7fd01dd314c0 )>",
"<NSLayoutConstraint:0x7fd01dd31bb0 V:[UIButton:0x7fd01dd171a0'Reset Data']-(0)-| (active, names: '|':UITableViewCellContentView:0x7fd01dd314c0 )>",
"<NSLayoutConstraint:0x7fd01d8516c0 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7fd01dd314c0.height == 44 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fd01dd16530 UIButton:0x7fd01dd171a0'Reset Data'.height == 44 (active)>
I don't understand why I'm getting the error. As suggested at this link What is NSLayoutConstraint "UIView-Encapsulated-Layout-Height" and how should I go about forcing it to recalculate cleanly?, I tried lowering the priority of the height constraint to 999 and it didn't fix the issue. I also gave an estimated height of 44 and it reduced the output to simply the warning about a zero height.
What am I doing wrong?