【发布时间】:2015-08-10 10:42:59
【问题描述】:
我在尝试搜索对象 UserDetail 时收到此错误消息。
错误信息
/Users/MNurdin/Documents/iOS/xxxxx/ViewController.swift:125:15: Cannot invoke 'getObjectInBackgroundWithId' with an argument list of type '(PFUser?, (PFObject?, NSError?) -> Void)'
我的代码
var user = PFUser.currentUser()
var query = PFQuery(className:"UserDetail")
query.getObjectInBackgroundWithId(user) { //error message here
(gameScore: PFObject?, error: NSError?) -> Void in
if error != nil {
println(error)
} else if let gameScore = gameScore {
gameScore["cheatMode"] = true
gameScore["score"] = 1338
gameScore.saveInBackground()
}
}
【问题讨论】:
标签: ios swift parse-platform