In this video I show how to create dynamic row heights in a tableview. You will see how to layout a label and tableview in a stack panel and add data to a tableview. Then I will show you how to change the height of the cells/rows depending on the length of the text in the cell.
This is my first tutorial video so any constructive criticism is welcome!
Note: You actually don’t need this line of code:
tableView.estimatedRowHeight = 44
But it helps with performance. Here’s what Apple says about estimatedRowHeight:
“Providing a nonnegative estimate of the height of rows can improve the performance of loading the table view. If the table contains variable height rows, it might be expensive to calculate all their heights when the table loads.”
xcode tutorials swift