I have a table view that contains a static set of 2 rows (created in storyboard). I have a specific UITableViewCell that contains a text box thats size is dynamically generated. I would like to also dynamically set the hight for the containing UITableViewCell, however setting the .frame for the UITableViewCell does not seem to be working. Has anyone done this programatically, without using tableView:heightForRowAtIndexPath: ?
Current code:
CGSize maximumLabelSize = CGSizeMake(296,9999);
CGSize expectedLabelSize = [self.place.details sizeWithFont:self.descriptionLabel.font
constrainedToSize:maximumLabelSize
lineBreakMode:self.descriptionLabel.lineBreakMode];
CGRect labelFrame = self.descriptionLabel.frame;
labelFrame.size.height = expectedLabelSize.height;
// this does not change the height of the UITableViewCell....
self.descriptionTableViewCell.frame = labelFrame;