【发布时间】:2016-04-28 06:10:35
【问题描述】:
我刚刚输入的下面是错误,显示“无法将类型 '(,) -> Void' 的值覆盖到预期的参数类型 '(NSERROR!) -> Void!)'
在这行代码上:会有什么问题?
FIREBASE_REF.createUser(email, password: password, withCompletionBlock: {(error,authData) -> Void in
@IBAction func creatAccountAction(sender: AnyObject) {
let email = self.emailTextField.text
let password = self.passwordTextField.text
if email != "" && password != ""
{
FIREBASE_REF.createUser(email, password: password, withCompletionBlock: {(error,authData) -> Void in
if error != nil {
FIREBASE_REF.authUser(email, password: password, withCompletionBlock: { (error, authData) -> Void in
if error == nil {
NSUserDefaults.standardUserDefaults().setValue(authData.uid, forKey: "uid")
}
else {
print (error)
}
})
}
else {
print (error)
}
}
)}
else
【问题讨论】:
标签: swift firebase firebase-authentication