Skip to content

Instantly share code, notes, and snippets.

@MugunthKumar
Created January 8, 2012 00:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MugunthKumar/1576556 to your computer and use it in GitHub Desktop.
Save MugunthKumar/1576556 to your computer and use it in GitHub Desktop.
MKNetworkEngine and UIImageView
[AppDelegate.imageFetcher imageAtURL:self.profile.avatarURL
onCompletion:^(UIImage *image, NSURL *url, BOOL isInCache)
{
// this "if" is to prevent images flashing repeatedly when cells are reused.
if ([[self.profile.avatarURL absoluteString] isEqualToString:[url absoluteString]]) {
self.avatarImageView.image = resizedImage;
}
}];
@MugunthKumar
Copy link
Author

@Burnsoft
Copy link

thanks Mugunth, I intend to. I saw on twitter you had written this. much appreciated.
Regards
Nik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment