title: UIImage return nil on some images?
body: <p>I have about 500 images as resources in my app.  </p>
  
  <p>First, is that a bad thing?  How else can I store them?</p>
  
  <p>Second, when I load them as follows:</p>
  
  <pre><code>for (int i=0; i &lt; [imageArray count]; i ++)
  {
      IngredientObject * o = ((ImageObject*)[imageArray objectAtIndex:i]);
      UIImage * img = [UIImage imageNamed:o.imageName];
      .
      .
      .
  }
  </code></pre>
  
  <p>Sometime it returns nil.  I am assuming it is a memory issue since it does not happen on the simulator, only on the real device.  Each image is small... about 10k to 20k each, but that still ends up being about 10meg.  I did not think this would be a problem on a 16gb device.  </p>
  
  <p>Would it be better to not use imageNamed: and use imageWithContentsOfFile or some other method.  This images are ultimately in a UIScrollerView and I am not sure how I would go about loading them as needed because I was concerned about the scrolling performance if it had to load the images dynamically.</p>
  
  <p>Any help is appreciated.</p>
  
  <p>Thank you</p>