看起来像一个约束问题仍然可以做很少的步骤
viewdidload
tableView.estimatedRowHeight = YourTableViewHeight tableView.rowHeight = UITableViewAutomaticDimension