【发布时间】:2016-09-19 06:35:02
【问题描述】:
更新我的 Xcode 后,我在 backendless 的查找语法中遇到错误,例如
dataStore.find(
{ (result: BackendlessCollection!) -> Void in
let contacts = result.getCurrentPage()
for obj in contacts {
print("\(obj)")
}
},
error: { (fault: Fault!) -> Void in
print("Server reported an error: \(fault)")
})
错误是:Cannot convert value of type '(BackendlessCollection!) -> Void' to expected argument type '((BackendlessCollection?) -> Void)!'
我该如何解决???
【问题讨论】:
-
编译器建议将
(result: BackendlessCollection!) -> Void替换为((result: BackendlessCollection?) -> Void)! -
哦,好吧,告诉我一些我不知道的事情,我该怎么做?
-
用其他代码替换代码有什么不清楚的地方?
-
(result: BackendlessCollection?)喜欢这样吗? @vadian -
将左侧的整个表达式替换为右侧的整个表达式。
标签: swift3 xcode8 backendless