0
におけるパラメータ「送信者の引数がありませんし、私は他に何を入力する。は、私はいつもこのエラーが出るコール
は、あなたたちは何が起こっているか知っていますか分からないのですか?
@IBAction func loginAction(sender: AnyObject)
{
let email = self.emailTextField.text
let password = self.passwordTextField.text
if email != "" && password != ""
{
FIREBASE_REF.authUser(email, password: password, withCompletionBlock: { (error, authData) -> Void in
if error == nil
{
NSUserDefaults.standardUserDefaults().setValue(authData.uid, forKey: "uid")
print("Logged in")
self.logoutButton.hidden = false
self.performSegueWithIdentifier(String, sender: AnyObject?)
self.presentViewController(HomeViewController, animated: true, completion: nil)
}
else
{
print(error)
}
})
}
else
{
let alert = UIAlertController(title: "Error", message: "Enter Email and Password", preferredStyle: .Alert)
let action = UIAlertAction(title: "OK", style: .Default, handler: nil)
alert.addAction(action)
self.presentViewController(alert, animated: true, completion: nil)
}
}
@IBAction func logoutAction(sender: AnyObject)
{
CURRENT_USER?.unauth()
NSUserDefaults.standardUserDefaults().setValue(nil, forKey: "uid")
self.logoutButton.hidden = true
}
}
エラーがライン
self.presentViewVontroller(HomeViewController ...
である私はすでにストーリーボードにセグエを作成した。
少なくともperformSegueWithIdentifier'あなた 'でのタイプ自体ではなく、segueのリテラル識別子や 'self'や' nil'などの型のインスタンスや、senderパラメータに必要なものを渡す必要があります。そして、ユーザのデフォルトで 'setValue'を使わないでください。それは 'setObject'です – vadian
コードのどこにsetValueがありますか? –
'logoutAction'で – vadian