Next up in iOS at a glance series, where I give you a quick visual about an iOS development concept, we’ll jump into stack views.
Sticking with old-school UIKit concepts a little conger, stack views give us a simple way (pre-SwiftUI) to lay out a screen without a bunch of constraints, which can quickly become ungainly.
Stack views just organize subviews in a row, either vertically or horizontally. Stack views can be combined with each other as well to create complex layouts, such as below.
Stack views are typically invisible and only used to contain other views, so what we actuality see is this.
So there it is: stack views boiled down to a quick visual. Of course, the topic goes much deeper, including options for distribution, alignment, and spacing.