Inherits from NSObject
Declared in SDWebImagePrefetcher.h
SDWebImagePrefetcher.m

Overview

Prefetch some URLs in the cache for future use. Images are downloaded in low priority.

Properties

maxConcurrentDownloads

Maximum number of URLs to prefetch at the same time. Defaults to 3.

@property (nonatomic, assign) NSUInteger maxConcurrentDownloads

Declared In

SDWebImagePrefetcher.h

options

SDWebImageOptions for prefetcher. Defaults to SDWebImageLowPriority.

@property (nonatomic, assign) SDWebImageOptions options

Declared In

SDWebImagePrefetcher.h

Class Methods

sharedImagePrefetcher

Return the global image prefetcher instance.

+ (SDWebImagePrefetcher *)sharedImagePrefetcher

Declared In

SDWebImagePrefetcher.h

Instance Methods

cancelPrefetching

Remove and cancel queued list

- (void)cancelPrefetching

Declared In

SDWebImagePrefetcher.h

prefetchURLs:

Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching, currently one image is downloaded at a time, and skips images for failed downloads and proceed to the next image in the list

- (void)prefetchURLs:(NSArray *)urls

Parameters

urls

list of URLs to prefetch

Declared In

SDWebImagePrefetcher.h

prefetchURLs:completed:

Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching, currently one image is downloaded at a time, and skips images for failed downloads and proceed to the next image in the list

- (void)prefetchURLs:(NSArray *)urls completed:(void ( ^ ) ( NSUInteger finishedCount , NSUInteger skippedCount ))completionBlock

Parameters

urls

list of URLs to prefetch

completionBlock

block to be called when prefetching is completed

Declared In

SDWebImagePrefetcher.h