In my cell.xib, I have a label, with constraints to all its sides. I've set that label to lines = 0
and line-break = word wrap
. Then, I do this to my TableView:
self.tableView.rowHeight = UITableViewAutomaticDimension
self.tableView.estimatedRowHeight = 100.0
Everything works great, and my UITableViewCell is auto-height. If the text is long, then my tableView intelligently calculates the size.
The problem is -- how do I tell my UITableView to "re-calculate" the size once the content changes in the cell?
My cell could call its delegate, and in this delegate, I'd like the TableView to re-draw the height.
Right now, the content in my cells change constantly, but the cell height never changes.
UITableViewAutomaticDimension
then it problem with Constraints. and another way to auto resize i sugest yopu to use KeyValue Observer. – PyreneUITableViewCell
orUITableView
? Also, you can running on which iOS Version? – LambdoidUITableViewCell
? – LambdoidcontentSize
of theUITableView
, then update theUITableView
frame.height
– Gargoyle