I have TextFields for Login and SecureField for Password. How can I go to another view when my Login and Password are correct?
struct LoginBoard: View {
@State private var login = "Tony"
@State private var password = "1234"
var body: some View {
ZStack {
VStack {
HStack {
Text("Enter Login and Password")
}
HStack {
Image(systemName: "person")
TextField("Login", text: $login)
}
HStack {
SecureField("Password", text: $password)
}
Button("Login") {
}
}
}
}
}