I came from this great answer:
Using Auto Layout in UITableView for dynamic cell layouts & variable row heights
I've implemented the things described in that answer but I'm facing with a little different scenario. I haven't one UILabel
but instead I have a dynamic list of UILabel
s.
I've created an image showing some different cases of what the table view should look:
At the current state of the repo the cell doesn't grow vertically to fit the cell's contentView
.
UPDATE
REPO: https://github.com/socksz/DynamicHeightCellAutoLayout
If you try to get the project from the repo and run it, you can see exactly what is the problem I'm referring. I can't get what is missing for let it works.
adjustsFontSizeToFitWidth
property set to YES. If you've run the project you've seen that the cell doesn't grow vertically to fit thecontentView
unfortunately. – Tattered