Created
January 21, 2012 23:26
-
-
Save blackgold9/1654503 to your computer and use it in GitHub Desktop.
image problem
This file contains hidden or 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
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