0

I'm trying create UITableViewCell from Nib. So my xib. file looks like:

enter image description here

How change height of each row of my tableView depends of content size?

zzheads
  • 1,368
  • 5
  • 28
  • 57

1 Answers1

1

Look at great tutorial: https://www.raywenderlich.com/129059/self-sizing-table-view-cells Its for autolayout-way. But delegate method

func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
    //code
}

is much more preferred cause its REAL faster. Look here: https://medium.com/ios-os-x-development/perfect-smooth-scrolling-in-uitableviews-fd609d5275a5#.i439tyds6

Nikita Patskov
  • 427
  • 3
  • 7
  • Thanks a lot! Answer at SOF awesome - http://stackoverflow.com/questions/18746929/using-auto-layout-in-uitableview-for-dynamic-cell-layouts-variable-row-heights/18746930#18746930 – zzheads Jan 08 '17 at 15:07