mu UITableビューでは、サーバーからの画像を表示しています..そのために、遅延読み込みを使用しています。行が画面に表示されているときに画像を読み込むことができます。読み込む画像の数を増やす方法。
同様に、初めて 3 つのテーブル セルが表示され、それらのセルの画像が 2 秒の遅延で読み込まれます。次の 3 行の画像を同時に読み込むにはどうすればよいですか?
以下の関数を使用して画像をロードしています
- (void)loadImagesForOnscreenRows
{
if ([imageArray count] > 0)
{
NSArray *visiblePaths = [tableView indexPathsForVisibleRows];
for (NSIndexPath *indexPath in visiblePaths)
{
AppRecord *appRecord = [dataArray objectAtIndex:indexPath.row];
if (!appRecord.appIcon) // avoiding the imagen download if already has an image
{
[self startIconDownload:appRecord forIndexPath:indexPath];
}
}
}
}