Show Alert from Anywhere in SwiftUI
Reading time: 2 min
This recipe shows how to show an alert dialog from anywhere in the SwiftUI app. Normally, alert
is tied to a specific view, and its content is handled by that view's state. This solution, however, makes it so that the alert is defined in just a single place and is always presented on top of current view.
Reading time: 2 min
This recipe shows how to show multiple Alert
s, ActionSheet
s or custom dialogs, without tying them to multiple views.
Progress Dialog / HUD in SwiftUI
Reading time: 1 min
This recipe shows how to render a progress dialog / HUD in SwiftUI.
SwiftUI Alert with TextField
Reading time: 2 min
This recipe shows how to add a TextField
to a SwiftUI alert
dialog.