Reading time: 1 min

This recipe shows how to implement shake gesture detection in SwiftUI. The result looks like this (you'll have to image the phone being shaken :)):

Preview

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

The recipe is as follows:

  1. Override UIWindow's motionEnded for motion...

Continue Reading...

Reading time: 3 min

This recipe shows how to implement a swipeable pager view in SwiftUI. The end result will look like this:

Preview

A pager view lays its child views out as pages - single, currently selected child view occupies the entire pager. The user can swipe left or right to move through different pages.

First...

Continue Reading...