zzheads
zzheads

Reputation: 1482

Making UITableViewCell from Nib

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?

Upvotes: 0

Views: 350

Answers (1)

Nikita Patskov
Nikita Patskov

Reputation: 457

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

Upvotes: 1

Related Questions