Measuring Subviews
Query subview sizes during layout.
Measurement Drives Layout
Before you can place children, you must measure them. SwiftUI layout is a negotiation: the parent proposes sizes, children respond, and you reconcile the answers.
Asking a Subview Its Size
Each proxy in Subviews answers sizeThatFits(_:) for a given ProposedViewSize. The proxy returns the size that child would take under that proposal.
let size = subview.sizeThatFits(.unspecified)