在我的项目中使用 Parse,我有这一行
query.findObjectsInBackgroundWithBlock({ (objects:[PFObject], error:NSError) -> Void in })
但是 Xcode 一直告诉我:
cannot invoke this method with an argument list `([PFObject],NSError)`.
知道为什么吗?
最佳答案
不是在每个参数的末尾都有感叹号,而是将 !到一个?所以会是
query.findObjectsInBackgroundWithBlock({ (objects: [AnyObject]?, error: NSError?) -> Void in
那是我尝试过的,它似乎有效。
关于ios - 在 iOS 中使用 Parse 调用 findObjectsInBackGroundWithBlock() 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29681158/