Understanding Grids in SwiftUI for iOS 14
SwiftUI was announced at WWDC 2019 and it paved a way for declarative programming for building interfaces. SwiftUI Grid comes in two different flavours, which includes LazyVGrid and LazyHGrid. As the name suggest, LazyVGrid is a Grid that flows in vertical direction and the LazyHGrid flows in horizontal direction.
If you are interested in videos then check out the following videos associated with this post.
Each Grid consists of GridItem, which dictates the structure of the cell displayed in the grid. GridItem can be fixed, flexible or adaptive. Let’s start with the fixed size GridItems.