重用
MonthlyReviewCell * cell = (MonthlyReviewCell *)[tableView dequeueReusableCellWithIdentifier:@"MonthlyReviewCellID"];
if ( !cell ) {
cell = [[MonthlyReviewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"MonthlyReviewCellID"];
}
单独
NSString *cellIdentifierResult = [NSString stringWithFormat:@"Resultcell%ld%ld", (long)[indexPath section], (long)[indexPath row]];//以indexPath来唯一确定cell
ResultClientTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifierResult];
if(nil == cell){
cell = [[ResultClientTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifierResult];
}
网友评论