Reading time: 1 min

This recipe show how to display a custom dialog in SwiftUI. You can customize the dialog content in any way you want.

Here's what the end result can look like:

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

The custom dialog will be a ViewModifier that wraps the attac...

Continue Reading...

Reading time: 2 min

This recipe shows how to create a simple file tree using SwiftUI expandable list. This feature is useful for representing any hierarchical data structure, allowing the user to expand and collapse branches to navigate the tree.

The end result looks like this:

ezgif-7-d7434b693fff

This feature is only availabl...

Continue Reading...

Reading time: 6 min

This recipe shows how to add a Map View using SwiftUI. It also shows how to add pins/markers/annotations to the map, allowing for mixing of different map annotation types.

The end result will look like this:

If you just want something you can use right away, you can find the full code h...

Continue Reading...

Reading time: 2 min

This recipe shows how to combine ScrollViewReader and onChange(of:perform:) to jump to the selected item in a scrollable view. We'll use this method to update our top tabs and make them fully visible when selected. You can see the end result here:

Both the ScrollViewReader and onC...

Continue Reading...

Reading time: 1 min

This recipe shows how to implement an indefinite loading bar in SwiftUI. This kind of view is common in Android Material Design as it's sleek and takes up less space than a conventional, circular LoadingView. The end result looks like this:

The code for this is quite simple:

  1. Render a Re...

Continue Reading...