0

How to self adjust the uItableview Cell element.

automatic adjust of UITableViewCell size.

Dhanaraj
  • 57
  • 1
  • 10

1 Answers1

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

iamirzhan
  • 914
  • 5
  • 16