- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
ChatCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
[cell setNeedsUpdateConstraints];
[cell updateConstraintsIfNeeded];
[cell setCellContent:self.data[indexPath.row]];
[cell setNeedsLayout];
[cell layoutIfNeeded];
CGFloat height = [cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height;
return height;
}