https://www.fivestars.blog/articles/swiftui-environment-propagation/
View Hierarchy A View Hierarchy establishes the relationship among all views in any given window.
This hierarchy is connected by many parent-child relationships. Given any view:
the view containing that view is known as its parent view (a.k.a. the superview) the views within that view are known as its children views (a.k.a. subviews) Every view in the hierarchy has:
(up to) one parent/superview zero or more children/subviews In UIKit, we can access both superview and subviews of any UIView via its superview: UIView? and subviews: [UIView] properties.
Views that share the same parent/superview are called siblings, every view can have zero or more siblings.
A tree structure If we zoom out, a view hierarchy can be seen as an inverted tree structure, where:
each node is a UIView/View every link is a parent-child relationship The top-most node, also known as the root of our tree, is UIWindow's rootViewController's view.
Everything we display on screen will have this root view as its ancestor.
!!!!!!!!
We can print the view hierarchy at any time in lldb viapo UIWindow.value(forKeyPath: "keyWindow.rootViewController.view.recursiveDescription")!
!!!!!!!
4.2.1.4 Xcodegen Theme | Back To iOSWiki Contents | 4.2.2 Routing Theme Folder