how to design a table using auto layouts in ios swift code example
Example: uitableviewcell automatic height
self.tableView.rowHeight = UITableViewAutomaticDimension;
self.tableView.estimatedRowHeight = 44.0; // set to whatever your "average" cell height is