【发布时间】:2015-04-04 01:51:18
【问题描述】:
到目前为止,我遇到了这样的块问题:
user.signUpInBackgroundWithBlock {
(succeeded: Bool!, error: NSError!) -> Void in
if error == nil {
println("success")
} else {
println("\(error)");
// Show the errorString somewhere and let the user try again.
}
}
当我将它添加到 Xcode 中时,我得到了这个:
Cannot invoke 'signUpInBackgroundWithBlock' with an argument list of type '((Bool!, NSError!) -> Void)'
当我在 Xcode 6.3(非测试版)中运行此代码时,它运行良好。但是在 Beta 中它失败了,并且不允许我构建。任何想法,如果这将被清除,或者我可以使用不同的实现。我试过只使用 signUpInBackgroundWithTarget 但如果收到错误,我就无法正确访问错误。
【问题讨论】:
标签: ios xcode parse-platform