Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rs/SDWebImage
Browse files Browse the repository at this point in the history
  • Loading branch information
morizotter committed Jan 31, 2015
2 parents 22750a1 + feca1e8 commit ce73619
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Common Problems

### Using dynamic image size with UITableViewCell

UITableView determins the size of the image by the first image set for a cell. If your remote images
UITableView determines the size of the image by the first image set for a cell. If your remote images
don't have the same size as your placeholder image, you may experience strange anamorphic scaling issue.
The following article gives a way to workaround this issue:

Expand Down
4 changes: 3 additions & 1 deletion SDWebImage/SDImageCache.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ + (SDImageCache *)sharedImageCache {
static id instance;
dispatch_once(&once, ^{
instance = [self new];
kPNGSignatureData = [NSData dataWithBytes:kPNGSignatureBytes length:8];
});
return instance;
}
Expand All @@ -61,6 +60,9 @@ - (id)initWithNamespace:(NSString *)ns {
if ((self = [super init])) {
NSString *fullNamespace = [@"com.hackemist.SDWebImageCache." stringByAppendingString:ns];

// initialise PNG signature data
kPNGSignatureData = [NSData dataWithBytes:kPNGSignatureBytes length:8];

// Create IO serial queue
_ioQueue = dispatch_queue_create("com.hackemist.SDWebImageCache", DISPATCH_QUEUE_SERIAL);

Expand Down
4 changes: 3 additions & 1 deletion SDWebImage/SDWebImageManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ - (void)diskImageExistsForURL:(NSURL *)url

if (error.code != NSURLErrorNotConnectedToInternet && error.code != NSURLErrorCancelled && error.code != NSURLErrorTimedOut) {
@synchronized (self.failedURLs) {
[self.failedURLs addObject:url];
if (![self.failedURLs containsObject:url]) {
[self.failedURLs addObject:url];
}
}
}
}
Expand Down

0 comments on commit ce73619

Please sign in to comment.