下面我刚才输入的错误是显示“无法覆盖类型值”(,) - > Void'to expected argument type'(NSERROR!) - > Void!)'Firebase创建用户swift不起作用
在这行代码:?什么是错的
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
非常感谢! – elciann