Post

Replies

Boosts

Views

Activity

Reply to TVOS 17 - Text Field in Alert adds a Button
We can achieve buttons and textField correctly by not adding a placeholder to your textField in Alert. There is some bug with SwiftUI, if we add a placeholder to textField. Here is how to achieve Alert with textField and buttons: .alert("Alert Title!", isPresented: $showingAlert) { TextField(text: $name) {} Button("Submit") { print("Submit") } Button("Skip") { print("Skip") } } message: { Text("Enter channel name") }
Feb ’24