Reading time: 1 min

This recipe shows how to implement sticky headers & footers when using a LazyVStack or LazyHStack instead of a List.

Continue Reading...

Reading time: 3 min

This recipe shows how to implement drag & drop to reorder items in SwiftUI. It offers a recipe for a generic ReorderableForEach which can then be plugged into any layout, such as VStack, LazyVGrid, etc.

Continue Reading...

Reading time: 1 min

This recipe shows how to make all items in a VStack take up the same width as the widest item.

Continue Reading...

Reading time: 1 min

This recipe shows how to implement an orientation stack in SwiftUI. This stack will lay out its content along the main screen axis - vertical or horizontal. In other words, it's a VStack if your phone is in portrait mode and an HStack if it's in landscape.

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...