I created a fake navigationLink until it toggled,
NavigationLink(destination: ContentView(showHomeScreen: $showHomeScreen), isActive: $showHomeScreen){
Text("")
}.hidden()
else{
Auth.auth().signIn(withEmail: email, password: password) {(result, error) in
if error != nil {
errr = error!.localizedDescription
print(error!.localizedDescription)
}
else{
showHomeScreen.toggle()
print("login successcfully")
}
}
}
when I tap on Sign In button, it toggled and take me to Home Screen. I found the
solution on a website for videos.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…