Alignments

In this post I’ll discuss how alignments work in SwiftUI, building our understanding of how they function, and finishing by demonstrating how to create your own custom alignments for specific needs. Let’s start by taking a simple view that lays out horizontally three images of different heights: If you haven’t read my post about stacks, […]

Stacks

The three most important layout tools in your SwiftUI toolbox are the three kinds of stacks: horizontal, vertical, and z-axis (yes, there really is no good adjective for this one). These views are parents to multiple children, and in order to fully understand how these lay them out, you should first understand that views have […]

Views Have Fixed Sizes

One of the first things presented about SwiftUI is that its views determine their own sizes, and that those sizes are fixed. This is such a simple statement that it’s easy to move on quickly to get to the good stuff. This is a mistake, because it’s deceptive in its simplicity; this statement fundamentally changes […]