好的,我将 GeometryProxy 传递到结构视图主体中,我不知道如何执行此操作,但仍然使用 PreviewProvider 有人可以帮助我吗?
struct MyView: View {
let geometry: GeometryProxy
var body: some View {
VStack {
.... More Code Here
}
}
}
struct MyView_Previews: PreviewProvider {
static var previews: some View {
Group {
// This is where Im having trouble. I have no idea how to pass in GeometryProxy
MyView()
}
}
Run Code Online (Sandbox Code Playgroud) swiftui ×1