title: Better way to retrieve multiple images from Parse
body: <p>Noob question here and I know my code below is very wrong but it works in that it retrieves the 3 images I need. However, I'd like to know a better way to retrieve multiple images from Parse. </p>
  
  <p>Any help would be greatly appreciated!</p>
  
  <pre><code>func retrieveImage() {
  
      var query = PFQuery(className: "Items")
      query.orderByDescending("createdAt")
      query.findObjectsInBackgroundWithBlock { (objects: [AnyObject]?, error: NSError?) -&gt; Void in
          if error == nil {
              let imageObjects = objects as! [PFObject]
              for (index, object) in enumerate(imageObjects) {
  
                  let thumbnail1 = object["image1"] as! PFFile
                  let thumbnail2 = object["image2"] as! PFFile
                  let thumbnail3 = object["image3"] as! PFFile
  
                  thumbnail1.getDataInBackgroundWithBlock{(imageData: NSData?, error: NSError?) -&gt; Void in
                      if error == nil {
                          if let image = UIImage(data: imageData!) {
                              self.itemImages[index] = image
                      }
                  }
                  thumbnail2.getDataInBackgroundWithBlock{(imageData: NSData?, error: NSError?) -&gt; Void in
                      if error == nil {
                          if let image = UIImage(data: imageData!) {
                              self.itemImages2[index] = image
                              }
                          }
                      }
                  thumbnail3.getDataInBackgroundWithBlock{(imageData: NSData?, error: NSError?) -&gt; Void in
                      if error == nil {
                          if let image = UIImage(data: imageData!) {
                              self.itemImages3[index] = image
                          }
                      }
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>}</p>