I\'ve been using SDWebImage on my iPhone app to handle all of the image loading. I am using a placeholder image, and I want to crossfade or fade in the new image once it loads.
Try out this:
[self.myImage sd_setImageWithURL:storyThumbnailURL placeholderImage:[UIImage imageNamed:@"xyz"] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
if (cacheType == SDImageCacheTypeNone) {
self.myImage.alpha = 0;
[UIView animateWithDuration:0.3 animations:^{
self.myImage.alpha = 1;
}];
} else {
self.myImage.alpha = 1;
}
}];