Merge branch 'master' of github.com:rs/SDWebImage

This commit is contained in:
Naoki Morita 2015-01-31 22:34:54 +09:00
commit ce73619640
3 changed files with 7 additions and 3 deletions

View File

@ -193,7 +193,7 @@ Common Problems
### Using dynamic image size with UITableViewCell ### 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. 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: The following article gives a way to workaround this issue:

View File

@ -48,7 +48,6 @@ BOOL ImageDataHasPNGPreffix(NSData *data) {
static id instance; static id instance;
dispatch_once(&once, ^{ dispatch_once(&once, ^{
instance = [self new]; instance = [self new];
kPNGSignatureData = [NSData dataWithBytes:kPNGSignatureBytes length:8];
}); });
return instance; return instance;
} }
@ -61,6 +60,9 @@ BOOL ImageDataHasPNGPreffix(NSData *data) {
if ((self = [super init])) { if ((self = [super init])) {
NSString *fullNamespace = [@"com.hackemist.SDWebImageCache." stringByAppendingString:ns]; NSString *fullNamespace = [@"com.hackemist.SDWebImageCache." stringByAppendingString:ns];
// initialise PNG signature data
kPNGSignatureData = [NSData dataWithBytes:kPNGSignatureBytes length:8];
// Create IO serial queue // Create IO serial queue
_ioQueue = dispatch_queue_create("com.hackemist.SDWebImageCache", DISPATCH_QUEUE_SERIAL); _ioQueue = dispatch_queue_create("com.hackemist.SDWebImageCache", DISPATCH_QUEUE_SERIAL);

View File

@ -194,7 +194,9 @@
if (error.code != NSURLErrorNotConnectedToInternet && error.code != NSURLErrorCancelled && error.code != NSURLErrorTimedOut) { if (error.code != NSURLErrorNotConnectedToInternet && error.code != NSURLErrorCancelled && error.code != NSURLErrorTimedOut) {
@synchronized (self.failedURLs) { @synchronized (self.failedURLs) {
[self.failedURLs addObject:url]; if (![self.failedURLs containsObject:url]) {
[self.failedURLs addObject:url];
}
} }
} }
} }