I have X partitions. I want to be lazy to upload images to different user cells for each partition. Is there a better way to do this than to check every time if cellArray.object (visibleCells) is equal to Ccell in which I want to load these images?
UPDATE: Here is the working code (for now ...). My code is based on the example of Adrian Kosmachevsky here .
- (void)loadContentForVisibleCellsInSection{
NSArray *visiblePaths = [self.tableView indexPathsForVisibleRows];
for (NSIndexPath *indexPath in visiblePaths)
{
switch (indexPath.section) {
case 0:{
CustomCell *cell = (CustomCell *)[self.tableView cellForRowAtIndexPath:indexPath];
[cell loadImage];
}
break;
default:
break;
}
}
}
source
share