注册tableview注意点记录:

来源:互联网 发布:网络弊大于利反方辩词 编辑:程序博客网 时间:2024/05/22 12:53

[_cartTableViewregisterNib:[UINibnibWithNibName:@"VariousEatingTableViewCell"bundle:nil]forCellReuseIdentifier:variousEatingID];


VariousEatingTableViewCell *variousCell=[tableViewdequeueReusableCellWithIdentifier:variousEatingIDforIndexPath:indexPath];


-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath

方法中无法使用[self tableView:tableView cellForRowAtIndexPath:indexPath]取到cell;

导致无法直接通过返回cellHeight的方式动态返回单元格高度,慎重!

0 0
原创粉丝点击