解决iOS的UITableView滑动后数据的消失与增加

staticNSString* cellIdentifier =@"DepartparentTableCellView";

NSString* iPath = [[NSStringalloc]initWithFormat:@"%ld",(long)indexPath.row];

cellIdentifier = [cellIdentifierstringByAppendingFormat:@"%@",iPath];

UITableViewCell*cell = [tableViewdequeueReusableCellWithIdentifier:cellIdentifier];

if(!cell) {

cell = [[UITableViewCellalloc]initWithStyle:UITableViewCellStyleSubtitlereuseIdentifier:cellIdentifier];

}else{

[cell.contentView.subviewsmakeObjectsPerformSelector:@selector(removeFromSuperview)];

}

你可能感兴趣的:(解决iOS的UITableView滑动后数据的消失与增加)