Merge branch 'master' of github.com:rs/SDWebImage
This commit is contained in:
commit
ce73619640
|
@ -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:
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue