IBAction的错误消息

import UIKit 

import Firebase

class ViewController: UIViewController {

@IBOutlet weak var emailField: UITextField!

@IBOutlet weak var passwordField: UITextField!

@IBOutlet weak var emailkeyboard: UITextField!

@IBOutlet weak var passwordkeyboard: UITextField!

@IBOutlet weak var myaccountButton: UIButton!

@IBOutlet weak var welcomeLabel: UILabel!

override func viewDidLoad() {

super.viewDidLoad()

}

override func didReceiveMemoryWarning() {

super.didReceiveMemoryWarning()

// Dispose of any resources that can be recreated.

}

//Built in method

override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {

self.view.endEditing(true)

}

@IBAction func buttonPressed(sender: UIButton) {

self.emailkeyboard.resignFirstResponder()

self.passwordkeyboard.resignFirstResponder()

}

@IBAction func myaccountbutton(sender: AnyObject) {

FIRAuth.auth()?.signInWithEmail(self.emailField.text!, password: self.passwordField.text!, completion: { (user,error) in

}

@IBAction func createaccountButton(sender: AnyObject) {

FIRAuth.auth()?.createUserWithEmail(emailField.text!, password: passwordField.text!) { (user, error) in

if error == nil {

print("User Created")

if (FIRAuth.auth()?.currentUser) != nil

{

self.myaccountButton.alpha = 1.0

}

else

{

self.myaccountButton.alpha = 0.0

self.welcomeLabel.text = ""

}

}

}

}

}

}

我不知道在哪里把)我以前问过,但我仍然卡住。对不起,请再次提问。 我不知道如果在上面的代码或与IBAction本身的错误,所以我已经发布了所有的代码,也许这将有助于找到问题。IBAction的错误消息

回答:

signInWithEmail()函数调用缺少其结尾圆括号以及闭包参数的实际闭包。

以上是 IBAction的错误消息 的全部内容, 来源链接: utcz.com/qa/260263.html

回到顶部