获取某一组的所有cell

#pragma mark -获取某一组的所有cell

-(NSArray*)cellsForTableView:(UITableView*)tableView section:(NSInteger)section

{

NSMutableArray*cells = [[NSMutableArrayalloc]init];

NSIntegerrows =[tableViewnumberOfRowsInSection:section];

for(introw =0; row < rows; row++) {

NSIndexPath*indexPath = [NSIndexPathindexPathForRow:rowinSection:section];

[cellsaddObject:[tableViewcellForRowAtIndexPath:indexPath]];

}

returncells;

}

你可能感兴趣的:(获取某一组的所有cell)