How do I pass a View into a struct while getting its height also?
问题 I'm trying to make a View that will put a Blur() at the bottom of an iPhone layout, respecting safeareas and that I can easily reuse. Something like this: import SwiftUI struct SafeBottomBlurContainer: View { @Environment(\.colorScheme) var colorScheme var body: some View { GeometryReader { geometry in VStack { Spacer() ZStack { Blur(style: self.colorScheme == .dark ? .systemThinMaterialDark : .systemThinMaterialLight) .frame( width: geometry.size.width, height: geometry.safeAreaInsets.bottom