Я запутался в indexPath и indexPath.row, каждая ячейка tableView соответствует indexPath?так почему мы ищем «строку» этого indexPath?Я проверил документ, но я думаю, что это смущает меня.
Я нашел этот код:
// this method is used in case the user scrolled into a set of cells that don't have their app icons yet
- (void)loadImagesForOnscreenRows
{
if ([self.entries count] > 0)
{
NSArray *visiblePaths = [self.tableView indexPathsForVisibleRows];
for (NSIndexPath *indexPath in visiblePaths)
{
AppRecord *appRecord = [self.entries objectAtIndex:indexPath.row];
if (!appRecord.appIcon) // avoid the app icon download if the app already has an icon
{
[self startIconDownload:appRecord forIndexPath:indexPath];
}
}
}
}
Можете ли вы объяснить мне разницу между ними?
Пол