- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellID = @"cellid";
AotuTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (!cell) {
[tableView registerNib:[UINib nibWithNibName:@"AotuTableViewCell" bundle:nil] forCellReuseIdentifier:cellID];
// NSLog(@"%ld",++i);
cell = [tableView dequeueReusableCellWithIdentifier:cellID];
}
return cell;
}
简单的几行经常忘!!!记下来
iOS 开发 自定义 xibcell 重用
最新推荐文章于 2022-04-21 19:00:00 发布