Updated for Xcode 12.5
SwiftUI is designed to be composed right out of the box, which means you can place one view inside another as much as you need.
This is particularly useful when working with the major container views we are used to, such as navigation controllers and tab bar controllers. We can place any views we want right into another container view, and SwiftUI will adapt its layout automatically.
In this regard, SwiftUI’s own containers –
Group, and more – are no different from containers we make with our own view composition.
SPONSORED Catch bugs as soon as they happen and know exactly why a crash occurred. Instabug's SDK grabs all the logs they need to fix bugs, crashes and performance issues in minutes instead of days. Get screenshots, device details, network logs, repro steps, and tons of other critical insights needed to resolve issues and prioritize product backlogs straight from your dashboard. It only takes a minute to integrate!
Link copied to your pasteboard.