swift 3中的IOS应用程序未导航到其他ViewController

swift 3中的IOS应用程序未导航到其他ViewController,ios,viewcontroller,Ios,Viewcontroller,我正在做一个关于安全认证的项目…当我尝试注册我的电子邮件id和密码时,它不会进入下一个viewcontroller…当我运行我的代码时,它工作正常,没有显示任何错误,但我没有得到输出…这是我的代码 @IBAction func signInButtonTapped(_ sender: UIButton) { // TODO: Do some form validation on the email and password if let email = emailTextF

我正在做一个关于安全认证的项目…当我尝试注册我的电子邮件id和密码时,它不会进入下一个viewcontroller…当我运行我的代码时,它工作正常,没有显示任何错误,但我没有得到输出…这是我的代码

 @IBAction func signInButtonTapped(_ sender: UIButton) {
    // TODO: Do some form validation on the email and password


    if let email = emailTextField.text, let pass = passwordTextField.text {

        // Check if it's sign in or register
        if isSignIn {
            // Sign in the user with Firebase
            FIRAuth.auth()?.signIn(withEmail: email, password: pass, completion: { (user, error) in

                // Check that user isn't nil
                if let u = user {
                    // User is found, go to home screen
                    self.performSegue(withIdentifier: "goToHome", sender: self)
                }
                else {
                    // Error: check error and show message
                    self.displayAlertMessage(messageToDisplay: "Password didn't match");
                }


            })

        }
        else {
            // Register the user with Firebase

            FIRAuth.auth()?.createUser(withEmail: email, password: pass, completion: { (user, error) in

                // Check that user isn't nil
                if let u = user {
                    // User is found, go to home screen
                    self.performSegue(withIdentifier: "goToEnroll", sender: self)

                }
                else {
                    // Error: check error and show message
                }
            })

        }

    }

请检查故事板中的连接,确保当前VC->Home VC之间链接的序列名为:“goToHome”
请在此处检查注册VC的ID文件是否与您在故事板中给出的相同


注意:请首先检查您在这里提到的标识符是否与您的故事板相同。

是否可以为外部If添加其他部分(文本字段检查)。如果您未被处理,则可能会在第一时间终止控制。只需在其他部分添加一些打印消息谢谢…但我的注册按钮有时工作,有时不工作…我想对代码进行任何更改吗?您应该再次检查FireBase,我记得在Storyboard Func Prepareforsgue中优化连接(segue:uistoryboardsgue,sender:AnyObject?){if segue.identifier==“goToHome”{if let objViewController2=segue.destination as?ViewController2{objViewController2.str=emailId}}