SwiftUI Splash Screen
Reading time: 1 min
This recipe shows how to add a Splash Screen to your SwiftUI app! You can specify a custom view that will show when your app starts and then dismiss itself automatically after a certain period of time.
The end result looks like this:
This component is available as a Swift Package in thi...
SwiftUI Toolbar Placement Cheatsheet
Reading time: 5 min
This recipe is a cheatsheet for various ToolbarItemPlacement
values and combinations on iOS. This is useful because:
- The namings of the placement values don't necessarily clearly depict where will a
ToolbarItem
end up. - Some values don't play well with each other. E.g,
.primaryAction
will...
File Tree with Expanding List in SwiftUI
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:
This feature is only availabl...
Custom View Dialog in SwiftUI
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...
Map with Annotations in SwiftUI
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...