Allows SDWebImagePrefetcher options to be set set. Defaults to SDWebImageLowPriority.
This commit is contained in:
parent
102d7bd484
commit
35b6553eac
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue