Is there any way of finding the parent view size using SwiftUI, I have had a look through the documentation and examples and it seems most (if not all) are hard coding sizes, ideally I want to find the size of the parent and then set the sub view size based on a percentage of the parents size (probably in some swift helper class or something) e.g.
func getSizeFromParent(fractionHeight: Int, fractionWidth: Int) -> Size
{
var parentSize = // is there a way to get parent size somehow
var newHeight = parentSize.height * fractionHeight
var newWidth = parentSize.width * fractionWidth
return Size(newHeight, newWidth)
}
Note the above code is not meant to be a working example just pseudo code