You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found when calling the proxy.move function in onAppear, it doesn't correctly set the position. My code is like this:
structConfettiView:View{varbody:someView{VortexViewReader{ proxy inZStack{Text("Tap anywhere to create confetti.")VortexView(.confetti.makeUniqueCopy()){Rectangle().fill(.white).frame(width:16, height:16).tag("square")Circle().fill(.white).frame(width:16).tag("circle")}.onTapGesture{ location in
proxy.move(to: location) // works fine
proxy.burst()}.onAppear{
proxy.move(to:CGPoint(x:0, y:0)) // doesn't work
proxy.burst()}}}.navigationSubtitle("Demonstrates on-demand particle bursting").ignoresSafeArea(edges:.top)}}
I think the reason is that the nearestVortexSystem has not been set during onAppear.
What I want is to set an initial position for burst. Is there any workaround? Thanks!
The text was updated successfully, but these errors were encountered:
MKG26
added a commit
to MKG26/Vortex
that referenced
this issue
May 5, 2024
Hi, thanks for the great library.
I found when calling the
proxy.move
function in onAppear, it doesn't correctly set the position. My code is like this:I think the reason is that the
nearestVortexSystem
has not been set during onAppear.What I want is to set an initial position for burst. Is there any workaround? Thanks!
The text was updated successfully, but these errors were encountered: