Authored by Olivier Poitrey

Merge pull request #118 from jcole/master

Allows you to set SDWebImageOptions for SDWebImageOptions.  Defaults to SDWebImageLowPriority.
... ... @@ -27,6 +27,12 @@
@property (nonatomic, assign) NSUInteger maxConcurrentDownloads;
/**
* SDWebImageOptions for prefetcher. Defaults to SDWebImageLowPriority.
*/
@property (nonatomic, assign) SDWebImageOptions options;
/**
* Return the global image prefetcher instance.
*/
+ (SDWebImagePrefetcher *)sharedImagePrefetcher;
... ...
... ... @@ -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
... ...