下面我剛纔輸入的錯誤是顯示「無法覆蓋類型值」(,) - > 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