Using a UITableView
in Swift, could someone please help me automatically change the height of the cell based on the label, picture, and description please?
I want to dynamically change the cell size as the label text increases. i have already applied autolayout on the labels.
Considering you have already applied constraints on the label. And also set your number of lines to 0. And then paste the following code in viewDidLoad method
tableView.estimatedRowHeight = 44.0
tableView.rowHeight = UITableViewAutomaticDimension
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With