Created
April 13, 2017 05:25
-
-
Save KyonLi/7ac864e7217f952a50f1d523fb61c3b1 to your computer and use it in GitHub Desktop.
SDWebImage fade in effect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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