-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Hi all,
The code below does not trigger the confetti either onAppear or onTap. If I remove the TextField both work fine. Is this a known limitation?
import SwiftUI
import Vortex
struct ContentView: View {
@State var answer : String = ""
var suppliedAnswer : String = "Hello"
var body: some View {
VortexViewReader { proxy in
ZStack {
VStack
{
Text("What is the capital of the United States?")
TextField("Placeholder", text: $answer)
}
VortexView(.confetti.makeUniqueCopy()) {
Rectangle()
.fill(.white)
.frame(width: 16, height: 16)
.tag("square")
Circle()
.fill(.white)
.frame(width: 16)
.tag("circle")
}.onAppear()
{
let location1 = CGPoint(x: 221.0, y: 627.66)
let location2 = CGPoint(x: 233.0, y: 200.66)
proxy.move(to: location1)
proxy.burst()
proxy.move(to: location2)
proxy.burst()
}
.onTapGesture { location in
proxy.move(to: location)
proxy.burst()
}
}
}
}
}
#Preview {
ContentView()
}
Metadata
Metadata
Assignees
Labels
No labels