title: Difference between [UIImage imageNamed...] and [UIImage imageWithData...]?
body: <p>I want to load some images into my application from the file system. There's 2 easy ways to do this:</p>
  
  <pre><code>[UIImage imageNamed:fullFileName]
  </code></pre>
  
  <p>or:</p>
  
  <pre><code>NSString *fileLocation = [[NSBundle mainBundle] pathForResource:fileName ofType:extension];
  NSData *imageData = [NSData dataWithContentsOfFile:fileLocation];
  
  [UIImage imageWithData:imageData];
  </code></pre>
  
  <p>I prefer the first one because it's a lot less code, but I have seen some people saying that the image is cached and that this method uses more memory? Since I don't trust people on most other forums, I thought I'd ask the question here, is there any practical difference, and if so which one is 'better'?</p>
  
  <p>I have tried profiling my app using the Object Allocation instrument, and I can't see any practical difference, though I have only tried in the simulator, and not on an iPhone itself.</p>