[英]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?
有没有一种方法可以只通过一个查询加载多个图像?
No, in Parse you can not do such a thing. 不,在Parse中您不能做这样的事情。
What you can do is 你能做的是
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.