3 ms·
In iOS 16, SwiftUI introduces a new adaptive layout container called ViewThatFits. As the name suggests, its purpose is to find the most appropriate view among
by fatbobman 3y ago
In iOS 16, SwiftUI introduces a new adaptive layout container called ViewThatFits. As the name suggests, its purpose is to find the most appropriate view among a given set of views and use it. For most people, this is a simple and easy-to-use container. However, this article intends to thoroughly analyze it, including rule details, the meaning of ideal size, usage examples, and more. Lastly, we will create a replica version of ViewThatFits to deepen our understanding of it.