A sample Application in Swift 4.2 to demonstrate the dynamically increasing height of TableView Cell based on its Content. For details refer Self-sizing Table View Cells
override func viewDidLoad() {
super.viewDidLoad()
// Auto resizing the height of the cell
tableView.estimatedRowHeight = 140 //your estimated cell height
tableView.rowHeight = UITableViewAutomaticDimension
...
}
// If you are using Label , set numberOfLines = 0
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! UITableViewCell
cell.label.numberOfLines = 0
}
Happy Coding :)