Skip to content

Instantly share code, notes, and snippets.

@blackgold9
Created January 21, 2012 23:26
Show Gist options
  • Save blackgold9/1654503 to your computer and use it in GitHub Desktop.
Save blackgold9/1654503 to your computer and use it in GitHub Desktop.
image problem
NSURL *imageURL = [NSURL URLWithString:[podcast logoURL]];
[[SVPodcatcherClient sharedInstance] imageAtURL:imageURL
onCompletion:^(UIImage *fetchedImage, NSURL *url, BOOL isInCache) {
if ([[url absoluteString] isEqualToString:[imageURL absoluteString]]) {
if(!isInCache) {
CATransition *transition = [CATransition animation];
[self.logoImageView.layer addAnimation:transition forKey:nil];
}
self.logoImageView.image = fetchedImage;
if (!fetchedImage) {
LOG_NETWORK(1, @"Error loading image for url: %@", url);
}
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment