09 Dec 2020 swiftui alert textfield alertdialog uialertcontroller text dialog
Reading time: 2 min
This recipe shows how to add a
TextField to a SwiftUI
alert dialog. The end result looks like this:
The dialog supports:
- Custom title and message.
- Text field with a placeholder and keyboard type.
- Confirm button, whose callback returns the content of the text field.
Search our recipes!
Have a recipe for us?
Get in touch and let's grow the cookbook together!