I'm trying to adjust my UITableViewCell height according to the amount of space needed, however I can't seem to get it working with my current set up. I'm attempting to use auto layout and have looked at multiple threads and articles.
I've got the two lines of code required for this to work in my viewDidLoad()
tableView.estimatedRowHeight = 80
tableView.rowHeight = UITableViewAutomaticDimension
This is my current setup in my storyboard:
And it ends up turning out like this:
How would I go about fixing this and getting it working the way I want it to? (I'm most likely stuffing up something very simple with constrains, I'm just very bad with auto-layout and constraints)
Thanks, Max
EDIT
After trying some of @Joe 's suggestion from his answer on this post UITableViewAutomaticDimension Not Working for Resizing Cell Height.
I've tried many variants of what he suggested. It partially solves the issue, but messes a few things up. I also attempted reordering the way I added the constraints. It's turning out like this: