Answer the question
In order to leave comments, you need to log in
The modal window doesn't open, what's wrong?
Greetings! I study authorization with FireBase, I check for authorization, and if == false, I throw it on a modal window with registration.
Checking authorization:
Auth.auth().addStateDidChangeListener { Auth, user in
if(user == nil) {
print("User == nil")
self.showModalAuth()
}
}
func showModalAuth() {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let newvc = storyboard.instantiateViewController(withIdentifier: "SignInApp") as! SignInApp
self.window?.rootViewController?.present(newvc, animated: true, completion: {
print("Enter in newVC")
})
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question