0

How to self adjust the uItableview Cell element.

automatic adjust of UITableViewCell size.

3
  • automatic adjust of UITableViewCell size... ? is not clear , it means height based on content or else ...? Commented Jan 24, 2017 at 12:51
  • Hi Dhanaraj .. please provide the extra information regarding the question. Commented Jan 24, 2017 at 12:55
  • use this one : useyourloaf.com/blog/self-sizing-table-view-cells Commented Jan 24, 2017 at 12:56

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.