I'm been using SDWebImage(ver3.0) on my iOS app, and I want to fade in the new image of uitableviewcell once it loads like Path2.0, Pinterest, and Viddy.Thanks to iOS SDWebImage fade in new image, fade-in itself is working. However, image in cell is loaded again when scrolling tableview. This may be caused by a reuse of a cell.
Here is my code.
[cell.userImageView setImageWithURL:url
placeholderImage:placeholderImage
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType) {
if (!error) {
cell.userImageView.alpha = 0.0;
[UIView transitionWithView:cell.userImageView
duration:1.0
options:UIViewAnimationOptionTransitionCrossDissolve
animations:^{
[cell.userImageView setImage:image];
cell.userImageView.alpha = 1.0;
} completion:NULL];
}
}];