Skip to content

Instantly share code, notes, and snippets.

@KyonLi
Created April 13, 2017 05:25
Show Gist options
  • Save KyonLi/7ac864e7217f952a50f1d523fb61c3b1 to your computer and use it in GitHub Desktop.
Save KyonLi/7ac864e7217f952a50f1d523fb61c3b1 to your computer and use it in GitHub Desktop.
SDWebImage fade in effect
[photoImgeView setImageWithURL:[NSURL URLWithString:photoPath]
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType) {
if (cacheType == SDImageCacheTypeNone) {
photoImgeView.alpha = 0;
[UIView animateWithDuration:0.3 animations:^{
photoImgeView.alpha = 1;
}];
} else {
photoImgeView.alpha = 1;
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment