I have a very simple UITableViewController
, where I want to set a text on each textLabel
of the UITableViewCell
s.
The height shoul
This configuration from your viewDidLoad
:
tableView.estimatedRowHeight = UITableViewAutomaticDimension
tableView.rowHeight = UITableViewAutomaticDimension
...works only on iOS 11. It is an iOS 11 innovation and does not apply to earlier systems.
For iOS 10, you must supply an actual estimatedRowHeight
value (such as 60
) to turn on automatic variable row height calculation.