I have tried to hard code the row height in the table view cell. After running the program it looks like only one line. I suspect it is because of the height of the row
Set row height as well as estimated row height as Automatic in viewDidLoad()
as
table.rowHeight = UITableViewAutomaticDimension
table.estimatedRowHeight = UITableViewAutomaticDimension
In heightForRowAt:
set height as UITableViewAutomaticDimension
as
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableViewAutomaticDimension
}
Note: Set number of lines of label long restaurant name
as 0.