gpt4 book ai didi

ios - 解析在单个查询中加载多个 PFFile 图像

转载 作者:行者123 更新时间:2023-11-29 12:31:08 26 4
gpt4 key购买 nike

这是我加载图片的方式:

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.")
}
}
}

我为用户加载的每个图像运行这段代码。有没有办法只用一个查询加载多个图像?

最佳答案

不,在 Parse 中你不能做这样的事情。

你能做的是

  1. 关注parse blog看看他们有没有介绍这样的东西 future 。
  2. Parse 最近 open-sourced它的 SDK,如果你想花时间,你可以提交这样的代码,希望他们接受。

关于ios - 解析在单个查询中加载多个 PFFile 图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27661844/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com