在cell中计算出高度之后在tableview代理里面获取高度

经常忘记所以记下

-(CGFloat )tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    ModelCell *cell =(ModelCell *)[self tableView:tableView cellForRowAtIndexPath:indexPath];
    return cell.frame.size.height;
}

你可能感兴趣的:(在cell中计算出高度之后在tableview代理里面获取高度)