【发布时间】:2017-02-07 14:50:40
【问题描述】:
override func viewDidLoad() {
super.viewDidLoad()
let ref = FIRDatabase.database().reference()
ref.observe(.value, with: {
snapshot in
self.label1.text = (snapshot.value as AnyObject)["label"] as! String
}, withCancel: {
error in
print(error.description)
})
// Do any additional setup after loading the view, typically from a nib.
}
}, withCancel: { 行显示编译器错误:
无法将 '(_) -> ()' 类型的值转换为预期的参数类型 '((错误)-> 无效)'
【问题讨论】: