Skip to content

call success block not correct #94

ananfang opened this Issue Apr 13, 2012 · 3 comments

3 participants



[imageView_A setImageWithURL:URL_A placeholderImage:nil options:SDWebImageCacheMemoryOnly success:^(UIImage *image) {
// This block will be called twice, because of the following imageView_B's setImageWithURL:placeholderImage:options: will also call this success block
} failure:nil];

[imageView_B setImageWithURL:URL_B placeholderImage:nil options:SDWebImageCacheMemoryOnly];

rs commented Apr 13, 2012

This pull request should fix that: #92
I will merge it ASAP.

@rs rs closed this Apr 13, 2012



Hi! I have SDWebImage (2.6) installed by cocoapods. is this issue fixed in this version?
Because when I open same image url in different ViewControllers - the latest block called twice.
I fix it by adding
NSMutableArray *downloadSuccessBlocks;
NSMutableArray *cacheSuccessBlocks;

with same behavior like in
NSMutableArray *downloadDelegates;
NSMutableArray *cacheDelegates;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.