There is little chance that this will solve your problem, but it is too long to fit into the comment:
Tip 1:
If you reuse cells, you should not do [wcell.imageView setImage:] in the callback. During the execution of the callback code, there is a non-zero probability that wcell will point to a different cell in the table view than the one you would like to change.
Instead, use indexPath to refer to the cell you want to change:
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType) { if(image == nil) { UITableViewCell *actualCell = [tableView cellForRowAtIndexPath:indexPath]; [actualCell.imageView setImage:[UIImage imageNamed:@"115_64.png"]]; } }
Note that if the cell you want to change the image is no longer displayed, cellForRowAtIndexPath: will return nil , which is absolutely normal:
Return value
An object representing a table cell, or nil if the cell is not visible, or indexPath is out of range.
Tip 2:
No need to re-create the string when you already have;)
[NSURL URLWithString:[NSString stringWithFormat:@"%@", imageURL]] [NSURL URLWithString:imageURL]
Your problem :
I am a little puzzled, the code you showed is actually a simple SDWebImage "how-to" example application, and I just tested it with v3.3. So try reducing your code to a minimum to determine the real problem.
I would say get rid of all your application logic (e.g. feedLocal.images ) and just find out if the problem really arises from SDWebImage or not.
source share