Just TableView UITableViewAutomaticDimension Sample...
(UITableViewAutomaticDimension is used to check whether the Cell UI is well reflected.)
- The same objective-c source sample link: https://github.com/ClintJang/JWSTableViewAutomaticDimension
- ViewController.swift
override func viewDidLoad()
{
super.viewDidLoad()
// Self-Sizing Table View Cells
// These two lines of code will dynamically render the cell size.
// estimatedRowHeight : Setting the expected value, Default 0, but setting it to 1 causes an error. Let it be 2 or more
self.tableView.estimatedRowHeight = 44.0
self.tableView.rowHeight = UITableViewAutomaticDimension
}