Post

Replies

Boosts

Views

Activity

In my Button action event handler, I'd to transition to authorizeView() in the else code block. This else logic throwing me a fist.
Button(action: { if email.isEmpty { print("* Email is required.") } else { authorizeView() } }) { HStack { Text("NEXT") .fontWeight(.semibold) Image(systemName: "arrow.right") } .foregroundColor(.white) .frame(width: UIScreen.main.bounds.width - 32, height: 48) } .background(Color(.systemBlue)) .cornerRadius(10) .disabled(!formIsValid) .opacity(formIsValid ? 1.0 : 0.5)
2
0
281
Aug ’23