Open tiritea opened 5 years ago
adding this fix seems to work:
[self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:self.textLabel attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationLessThanOrEqual toItem:self.contentView attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
code:
This is the displayed result with very long label:
Relevant code:
In the code (above), constraints are specified for the textView to constraint it within the enclosing cell's contentView, but not for the textLabel. So for a very long label, autosizing the cell - ie row.height = UITableViewAutomaticDimension - doesnt work either.
Fix: add similar constraints on the textLabel too?