0

How to self adjust the uItableview Cell element.

automatic adjust of UITableViewCell size.

3

1 Answer 1

1

So, there are two lines of code to make your cellHeight self sizing.

tableView.rowHeight = UITableViewAutomaticDimension
tableView.estimatedRowHeight = 140 // set your estimatedHeight

But, be sure that your constraints in cell are installed right, and views have an intrinsic content size.

See this tutorial for more information https://www.raywenderlich.com/129059/self-sizing-table-view-cells

Not the answer you're looking for? Browse other questions tagged or ask your own question.