_tableView.rowHeight = UITableViewAutomaticDimension;
// 设置预估行高
_tableView.estimatedRowHeight = 100;
然后在Cell中每个控件约束高度都要设置好,最下面的一个控件bottom要设置约束self.contentView.mas_bottom
_tableView.rowHeight = UITableViewAutomaticDimension;
// 设置预估行高
_tableView.estimatedRowHeight = 100;
然后在Cell中每个控件约束高度都要设置好,最下面的一个控件bottom要设置约束self.contentView.mas_bottom