I have a slightly complicated setup in my storyboard, I have a UIViewController that contains a UITableViewController. In the UITableViewController, I have several prototype cells that I linked to subclasses of uitableviewcell objects in the code.
Using constraints and a storyboard, I would like to change the height of my prototype cell depending on the size that ends with UILabel depending on the text falling into it.
I currently have
UIViewController -- UITableViewController -- -- UITableViewCell ((melchat) prototype cell) -- -- -- ContentView -- -- -- -- UIView ((background) view with drop shadow card type effect) -- -- -- -- -- UIImageView (Avatar) -- -- -- -- -- IUlabel (dynamic (depending on code/input) multi line UILabel)
How I would like UILabel to resize the UIView (background), and then, in turn, resize this UITableViewCell.
I am using Xcode 8.2.1
I took a screenshot with the layout in the storyboard and applied the restrictions.

Update
I updated my restrictions so that almost everything returns to ContentView and updated the number of uilabel lines to 0, and then also implemented the UITableViewAutomaticDimension code, but it still doesn't work. Please see the code and screenshots below.
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return UITableViewAutomaticDimension; }


source share