gpt4 book ai didi

ios - 解析查询未按降序加载

转载 作者:搜寻专家 更新时间:2023-11-01 06:44:48 25 4
gpt4 key购买 nike

出于某种原因,当我使用 Parse 将图像添加到 tableView 时,它可以很好地从 Parse 中提取文件,但没有按降序加载...不确定为什么?

感谢您的帮助!

类 HomePageViewController:UIViewController,UITableViewDelegate {

@IBOutlet var homePageTableView: UITableView!

var albumImageFiles = [PFFile]()
var imageText = [String]()


override func viewDidLoad() {
super.viewDidLoad()

// Do any additional setup after loading the view.
var query = PFQuery(className: "Posts")
query.orderByDescending("createdAT")
query.findObjectsInBackgroundWithBlock { (posts:[AnyObject]?, error: NSError?) -> Void in

if error == nil {
//success fetching objects


for post in posts! {
self.albumImageFiles.append(post["imageFile"] as! PFFile)
self.imageText.append(post["albumText"] as! String)


}


/*reload the table*/
self.homePageTableView.reloadData()



} else {
println(error)


}

}


}

最佳答案

query.orderByDescending("createdAT")

应该是

query.orderByDescending("createdAt")

关于ios - 解析查询未按降序加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31600900/

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