Reading time: 5 min

This recipe shows how to detect when touch enters or exits your view. It shows how to do this for for two scenarios:

  1. Detect enter/exit in a single view.
  2. Detect enter/exit on a group of views, all sharing a single gesture.

Continue Reading...

Reading time: 3 min

This recipe shows how to add weights to HStack and VStack elements, so that you can easily size them relative to each other. E.g, if you had two views, one with weight of 10, and the other with weight of 5, the first one would be twice as wide / tall as the second one.

Continue Reading...

Reading time: 1 min

This recipe shows how to use fullScreenCover on iOS 13 (or any SwiftUI version, for that matter). It provides a drop-in replacement, fullScreenCoverCompat modifier that does the same trick regardless of what OS version you're running.

Continue Reading...

Reading time: 1 min

This recipe shows how to present multiple sheets or full screen covers on a single view in SwiftUI. It saves you from having to have multiple modifiers with isPresented, each holding their own view. Also, it automatically takes care of switching between different sheets / covers with just a single binding.

Continue Reading...

Reading time: 2 min

This recipe shows how to implement a timeline list in SwiftUI. Timeline list has a line, usually on the side, that connects rows / cells tied to the same date.

Continue Reading...