I am using https://github.com/rs/SDWebImage to upload images to a UITableView. This is how I implemented this (simple) inside cellForRowAtIndexPath
[cell.imageView setImageWithURL:[NSURL URLWithString:[item valueForKey:@"icon"]]placeholderImage:[UIImage imageNamed:@"icon_events_default.png"]];
After the images are loaded into the UITableView, I scroll down and then again and get the error: EXC_BAD_ACCESS
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder { SDWebImageManager *manager = [SDWebImageManager sharedManager]; // Remove in progress downloader from queue [manager cancelForDelegate:self]; UIImage *cachedImage = [manager imageWithURL:url]; if (cachedImage) { //EXC_BAD_ACCESS hapens here self.image = cachedImage; } else { if (placeholder) { self.image = placeholder; } [manager downloadWithURL:url delegate:self]; } }
Any help really appreciated.
source share