Esqarrouth
Esqarrouth

Reputation: 39181

Parse load multiple PFFile images in single query

Here is how I load images:

func LoadImage(sender:FeedVC, cellId:Int){

    self.currentlyLoading = true
    let query = feed[cellId].fileName

    query.getDataInBackgroundWithBlock {
        (imageData: NSData!, error: NSError!) -> Void in
        if error == nil {
            self.feed[cellId].fileImage = UIImage(data:imageData)!
            self.feed[cellId].loading = 2
            self.loadedCount++
            self.currentlyLoading = false
            sender.updateCell(cellId, animation: true)
            self.CheckWhatToLoad(sender)
        } else {
            println("The LoadImage request failed.")
        }
    }
}

I run this piece of code for every single image the user loads. Is there a way to load multiple images with only 1 query?

Upvotes: 1

Views: 150

Answers (1)

demiculus
demiculus

Reputation: 1343

No, in Parse you can not do such a thing.

What you can do is

  1. Follow parse blog and see if they introduce such a thing in the future.
  2. Parse has recently open-sourced its SDKs and if you wish to spend the time, you can commit such a code and hope that they accept it.

Upvotes: 1

Related Questions