diff --git a/SDWebImage/SDWebImagePrefetcher.h b/SDWebImage/SDWebImagePrefetcher.h index 9228b6d9..87c5316c 100644 --- a/SDWebImage/SDWebImagePrefetcher.h +++ b/SDWebImage/SDWebImagePrefetcher.h @@ -26,6 +26,12 @@ */ @property (nonatomic, assign) NSUInteger maxConcurrentDownloads; +/** + * SDWebImageOptions for prefetcher. Defaults to SDWebImageLowPriority. + */ +@property (nonatomic, assign) SDWebImageOptions options; + + /** * Return the global image prefetcher instance. */ diff --git a/SDWebImage/SDWebImagePrefetcher.m b/SDWebImage/SDWebImagePrefetcher.m index 1fbdaae6..ad40322f 100644 --- a/SDWebImage/SDWebImagePrefetcher.m +++ b/SDWebImage/SDWebImagePrefetcher.m @@ -26,6 +26,7 @@ static SDWebImagePrefetcher *instance; { instance = [[SDWebImagePrefetcher alloc] init]; instance.maxConcurrentDownloads = 3; + instance.options = (SDWebImageLowPriority); } return instance; @@ -35,7 +36,7 @@ static SDWebImagePrefetcher *instance; { if (index >= [self.prefetchURLs count]) return; _requestedCount++; - [imageManager downloadWithURL:[self.prefetchURLs objectAtIndex:index] delegate:self options:SDWebImageLowPriority]; + [imageManager downloadWithURL:[self.prefetchURLs objectAtIndex:index] delegate:self options:self.options]; } - (void)reportStatus