I have prepared 2 views which are signing and also the home view. I tried to pop/hide the signing view after the user signing to the home view.
The problem now is the view is allow the user to click the back button to go back to the login view. I have no idea how to settle this. Can anyone give me some hints?
Here is my navigation code for login:
NavigationLink(destination: HomePageView(), tag: 1, selection: $selection) {
Button(action: {
print("Register tapped")
self.verify()
self.selection = 1
}) {
HStack {
Text("OK").foregroundColor(Color.white).bold().foregroundColor(.white)
.frame(width: UIScreen.main.bounds.width - 30, height: UIScreen.main.bounds.height / 12)
.background(Color.orange)
.cornerRadius(35.0)
.font(.headline)
.padding()
}
}
}