-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return [[[self heightArray]objectAtIndex:indexPath.row]floatValue];//几百个 heightArray,
}
-(NSArray *)heightArray
{
NSMutableArray *arr = [[NSMutableArrayalloc] init];
for (MessageDetailInfo *info inself.dataArray) {
CGSize contentSize = [info.contentsizeWithFont:[UIFontsystemFontOfSize:13.0f] constrainedToSize:CGSizeMake(labelWidth, MAXFLOAT)];
NSString *heightString = [NSString stringWithFormat:@"%.0f",contentSize.height + 120];
[arr addObject:heightString];
}
return arr;
}