title: Converting Swift iOS animation images using imagenamed to imagewithcontentsoffile
body: <p>Similar to: <a href="https://stackoverflow.com/questions/21822520/converting-imagenamed-to-imagewithcontentsoffile/" title="Converting imageNamed to imageWithContentsOfFile">https://stackoverflow.com/questions/21822520/converting-imagenamed-to-imagewithcontentsoffile</a></p>
  
  <p>I am trying to convert my simple animation from using imagenamed to imagewithcontentsoffile</p>
  
  <p>Right now, I have an array of images:</p>
  
  <pre><code>var myAnimation = [
  UIImage(named:"00.png")!,
  UIImage(named:"01.png")!,
  UIImage(named:"02.png")!,
  UIImage(named:"03.png")!,
  ]
  
  imageView.animationImages = myAnimation
  imageView.animationDuration = 1
  imageView.startAnimating()
  </code></pre>
  
  <p>I'm having memory problems. So I thought I would start by not caching the image files. I know how to convert imagewithcontentsoffiles with individual files, but not in the scenario above.</p>