Reading time: 2 min

This recipe shows how to show multiple Alerts, ActionSheets or custom dialogs, without tying them to multiple views. The end result looks like this:

ezgif-3-31b97e7c1ad8

The usual way of using multiple views has its shortcomings, as it:

  • Forces you to have at least as many views as distinct modals you wish...

Continue Reading...

Reading time: 1 min

This recipe shows how to render a progress dialog / HUD in SwiftUI. The end result looks like this:

This component is available as a Swift Package in this repo.

In order to make this happen, we'll use the custom view dialog from this recipe. If you haven't yet, be sure to check it ou...

Continue Reading...

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:

  1. Custom title and message.
  2. Text field with a placeholder and keyboard type.
  3. Confirm button, whose callback returns the content of the text field.
  4. Optiona...

Continue Reading...