self.tableView.rowHeight = UITableViewAutomaticDimension; self.tableView.estimatedRowHeight = 120.0; // 设置为一个接近“平均”行高的值
PS:需依赖Auto Layout.