ios - AutoLayout set height of UITableViewCell based on children -
i trying set height of uitableviewcell based on children's constraints. basically, here's layout:
uitableview > uitableviewcell > nesteduiview (with computable height)
i started setting top, bottom, left, , right constraints of nesteduiview 10px off uitableviewcell. then, tried adding height constraint (which in head force uitableviewcell expand fit content. of course though, causes constraint conflict , fails.
this seems should trivial, doing wrong?
add viewdidload method
self.tableview.rowheight = uitableviewautomaticdimension; self.tableview.estimatedrowheight = 42; this tell table use cell constraint's determine height.
Comments
Post a Comment