Reading time: 2 min

This recipe shows how to show multiple Alerts, ActionSheets or custom dialogs, without tying them to multiple views.

Continue Reading...

Reading time: 1 min

For whatever reason, stroking (i.e drawing a border) and filling a SwiftUI Shape at the same time is difficult and unintuitive. Shape has methods for both, stroke and fill, respectively, but they both return some View, meaning you can't chain them.

Continue Reading...

Reading time: 6 min

This recipe shows how to implement a custom Slider in SwiftUI. The default Slider view isn't particularly customisable, so any stepping outside the norm requires custom code.

Here's what the end result will look like:

Continue Reading...

Reading time: 1 min

This quick recipe shows how to measure a SwiftUI View, i.e get its size at runtime. This is useful when your layout depends on a particular view's dimensions.

Continue Reading...

Reading time: 1 min

This recipe shows how to implement shake gesture detection in SwiftUI.

Continue Reading...