1
我想要注册后警报控制器应该弹出,然后去loginFirstViewController但这不会发生,为什么?那就只反而loginfirstviewcontroller坡平了报警控制器UIAlertViewcontroller在去视图控制器之前没有被弹出
if error == nil {
FIRAuth.auth()?.currentUser!.sendEmailVerification(completion: { (error) in
})
print("You have successfully signed up")
//Goes to the Setup page which lets the user take a photo for their profile picture and also chose a username
let alertController = UIAlertController(title: "Successful!", message: "Email Verification link sent", preferredStyle: .alert)
let alertActionOkay = UIAlertAction(title: "Okay", style: .default)
let vc = self.storyboard?.instantiateViewController(withIdentifier: "LoginFirstViewController")
self.present(vc!, animated: true, completion: nil)
alertController.addAction(alertActionOkay)
self.present(alertController, animated: true, completion: nil)
}
要naviget到另一个VC,如果用户点击OK按钮,否则 –
您的viewController之前的ViewController呈现alertController呈现。您可以尝试在警报推送新视图控制器的好行为时在前一个控制器上显示警报。 –