title: imageNamed is evil - How to use the function
body: <pre><code>- (UIImage*)thumbnailImage:(NSString*)fileName
  {
     UIImage *thumbnail = [thumbnailCache objectForKey:fileName];
  
     if (nil == thumbnail)
     {
        NSString *thumbnailFile = [NSString stringWithFormat:@"%@/thumbnails/%@.jpg", [[NSBundle mainBundle] resourcePath], fileName];
        thumbnail = [UIImage imageWithContentsOfFile:thumbnailFile];
        [thumbnailCache setObject:thumbnail forKey:fileName];
     }
     return thumbnail;
  }
  </code></pre>
  
  <p>I got this code from <a href="http://www.alexcurylo.com/blog/2009/01/13/imagenamed-is-evil/" rel="nofollow">http://www.alexcurylo.com/blog/2009/01/13/imagenamed-is-evil/</a> . Can someone tell me how to use this code. I need just a little help how to use this in place of imageNamed.</p>