4 ms·
In SwiftUI, the concept of size, which is extremely important in layout, has become somewhat mystifying. Setting sizes or obtaining sizes is not as intuitive as
by fatbobman 3y ago
In SwiftUI, the concept of size, which is extremely important in layout, has become somewhat mystifying. Setting sizes or obtaining sizes is not as intuitive as one would expect. This article will unveil the veil covering the SwiftUI size concepts from the layout perspective, helping you understand and master the meanings and uses of the many sizes in SwiftUI. It will also give you a deeper understanding of the SwiftUI layout mechanism by creating copies of the frame and fixedSize view modifiers that conform to the Layout protocol.