I have custom Layouts which provide a relative HStack or VStack (based on code from Paul Hudson's Pro SwiftUI book). However, I need my subviews to have frames that are relative to the parent view size in both directions. So if the height is 50% of the parent's height, the width should be 50% of the parent's width. I can't get this to work; specifying fixed sizes for both height and width to the call to ProposedViewSize results in unexpected and unexplainable (by me, anyway) results.
I've searched for other custom layout examples and it seems like all of them specify either width or height and allow the other dimension to be flexible, which generally means that the subviews are hugging their content. Am I trying to do something that SwiftUI doesn't support? If not, can someone please explain or point me to an example? Thanks in advance!