Permalink
Browse files

Merge pull request #118 from jcole/master

Allows you to set SDWebImageOptions for SDWebImageOptions.  Defaults to SDWebImageLowPriority.
  • Loading branch information...
2 parents aa25f3a + 35b6553 commit 5aa5b46952f991110798bb928749d650f600ea92 @rs committed May 12, 2012
Showing with 8 additions and 1 deletion.
  1. +6 −0 SDWebImage/SDWebImagePrefetcher.h
  2. +2 −1 SDWebImage/SDWebImagePrefetcher.m
@@ -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 @@ + (SDWebImagePrefetcher *)sharedImagePrefetcher
{
instance = [[SDWebImagePrefetcher alloc] init];
instance.maxConcurrentDownloads = 3;
+ instance.options = (SDWebImageLowPriority);
}
return instance;
@@ -35,7 +36,7 @@ - (void)startPrefetchingAtIndex:(NSUInteger)index withManager:(SDWebImageManager
{
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

0 comments on commit 5aa5b46

Please sign in to comment.