ios - UITableView and UITableViewCell with dynamic height which is known only at WillDisplay -
i have uitableview
cells content of variable height. if works fine autolayouted content in case content loaded (bound ui) when cell displayed (recycling, reuse, etc) chance can know real uitableviewcell
height @ willdisplay
of table datasource.
at point missed estimatedheight
, getheightforrow
stages.
please advise, how can change uitableviewcell
height @ willdisplay
stage
if set autolayout right, , cell should calculate own hight, doesn't matter when , change content/content height, know adapt. check top of cell content has constraint top of cells contentview, , same bottom.
estimatedheight name says, estimate. meaning should have implementation of trying calculate datasource model object height, basic implementation.
or can run application 1 time, , keep see how cell height after calculates height autolayout, less "dynamic".
if cell changes height after set, can call:
[tableview beginupdates]; [tableview endupdates];
and cell recalculate itself, instead of reloading hole tableview.