Posted By

espinallab on 02/08/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

umang_nine


Async Images Code


 / Published in: Objective C
 

  1. [[AsyncImageCache shared] loadImageForURL:updateAnnotation.profileImageURL delegate:self];
  2.  
  3.  
  4. //---------------------------------------------------------------------
  5. // AsyncImageCache Delegate
  6. //---------------------------------------------------------------------
  7.  
  8. - (void)asyncImageCacheLoadedImage:(UIImage *)image forURL:(NSString *)url
  9. {
  10. // just in case
  11. [twitterUserIcon release];
  12. twitterUserIcon = nil;
  13.  
  14. // remember this image, if it corresponds to the expected URL
  15. UpdateAnnotation *updateAnnotation = (UpdateAnnotation *) self.annotation;
  16. if (image != nil && [url isEqualToString:updateAnnotation.profileImageURL])
  17. {
  18. twitterUserIcon = [image retain];
  19. [self fadeInNewUserIcon];
  20. }
  21.  
  22. // force full redraw
  23. [self setNeedsDisplay];
  24. }

Report this snippet  

You need to login to post a comment.