Why does
GeometryReader { geometry in body(for: geometry.size)
work. But this doesn't?
GeometryReader(content: { (geometry: GeometryProxy) -> Content in body(for: geometry.size)})
I get this error: Cannot find type 'Content' in scope
It's strange because aren't these identical? The difference is we get rid of the types because of type inference and the content label because that's inferred too.
Moreover, why does geometry contain so much information like size, etc? I'm not too familiar with geometryproxy and so I'll need to do more reading on it but would appreciate a brief explanation if it's not a hassle.
question from:
https://stackoverflow.com/questions/66049988/two-implementations-of-geometry-reader-but-one-isnt-working 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…