How to add a TextField to Alert in SwiftUI?

Alert is quite limited at the moment, but you can roll your own solution in pure SwiftUI. Here’s a simple implementation of a custom alert with a text field. struct TextFieldAlert<Presenting>: View where Presenting: View { @Binding var isShowing: Bool @Binding var text: String let presenting: Presenting let title: String var body: some View { … Read more