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呈現。您可以嘗試在警報推送新視圖控制器的好行爲時在前一個控制器上顯示警報。 –