ios - 在 iOS 中使用 Parse 调用 findObjectsInBackGroundWithBlock() 时出现问题

标签 ios swift parse-platform

在我的项目中使用 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/

相关文章:

ios - Swift:在共享容器 View 中更新标签

iphone - iOS 4.0 v 4.2 AdMob问题:尝试在ADBannerContentSizeIdentifierPortrait上的设备中断上运行

ios - iOS 的 Cordova 应用程序构建失败 ** 存档失败 **

swift - Swift 中的 ExistentialMetatype 是什么

ios - UIStackView 内的 UITextField 宽度约束问题

ios - 显示用户名 - 解析

ios - 解析通知问题。 iOS 9.1、Xcode 7.1.1

ios - UISearchController 的 searchBar 没有填满整个宽度

ios - RxSwift 和 UIPickerView

javascript - Parse.User.logIn 卡住了