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];
}
}
}
}
2つの違いを説明できますか?
どうもありがとう
ポール