Skip to content

Instantly share code, notes, and snippets.

@wizard1066
Created April 6, 2020 14:57
Show Gist options
  • Save wizard1066/9630c61caacb2994a1caea81f1ff8b56 to your computer and use it in GitHub Desktop.
Save wizard1066/9630c61caacb2994a1caea81f1ff8b56 to your computer and use it in GitHub Desktop.
abgwtp22
var rectIndex = 0
struct InsideViewV: View {
@ObservedObject var stepperInst:StepperData
var body: some View {
return VStack {
// if toggle {
GeometryReader { geometry in
Rectangle()
.fill(Color.yellow)
.frame(width: minWidith, height: minHeight, alignment: .center)
.opacity(0.5)
.onAppear {
if runOnce {
self.stepperInst.stepperDB[rectIndex].stepRect = geometry.frame(in: .global)
rectIndex += 1
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment