I'm watching the WWDC 2019 talk Building Custom Views with SwiftUI. Around 14:50 he's describing the algorithm for the layout, and he says "we divide the space into 3 equal parts and propose one of those for the size of the least flexible child".
How does the parent (the HStack
) know which child is the "least flexible"?
Up to that point in the talk, the explanation of the layout algorithm in SwiftUI had been clear to me -- parent views propose a size to child views, and child views respond with their desired size. In this case it sounds like some other property of each child is consulted before the size is proposed to the children. But what is that property and how do you control it from code?