Reading time: 1 min
This recipe shows how to implement sticky headers & footers when using a LazyVStack or LazyHStack instead of a List
.
SwiftUI Orientation Stack
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.
Weighted Layout (HStack and VStack) in SwiftUI
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.