Created
May 21, 2013 07:44
-
-
Save objectiveSee/5618142 to your computer and use it in GitHub Desktop.
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
// TODO: Use weak self to avoid retaining self for a long time (during long downloads) | |
SDWebImageManager *manager = [SDWebImageManager sharedManager]; | |
[manager downloadWithURL:imageURL | |
options:0 | |
progress:nil | |
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished) | |
{ | |
if ( [self.imageURL isEqual:imageURL] && | |
image && | |
!error ) | |
{ | |
[self setAvatarImage:image]; | |
} | |
} | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment