LayoutSubviews
A collection of proxy values that represent the subviews of a layout view.
Declaration
struct LayoutSubviewsOverview
You receive a LayoutSubviews input to your implementations of Layout protocol methods, like placeSubviews(in:proposal:subviews:cache:) and sizeThatFits(proposal:subviews:cache:). The subviews parameter (which the protocol aliases to the Layout.Subviews type) is a collection that contains proxies for the layout’s subviews (of type LayoutSubview). The proxies appear in the collection in the same order that they appear in the ViewBuilder input to the layout container. Use the proxies to perform layout operations.
Access the proxies in the collection as you would the contents of any Swift random-access collection. For example, you can enumerate all of the subviews and their indices to inspect or operate on them:
for (index, subview) in subviews.enumerated() {
// ...
}