1、在model 里面加一个属性:cellHeight , 用来保存cell的高度。
2、在cell类中,在layoutSubviews里面计算好cell的高度,赋值给model的属性 cellHeight.
3、在返回cell高度的方法中,拿到model ,取出model的cellHeight ,将其返回。
代理方法啊
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;