ios – SwiftUI transition not working properly when it contains LazyVGrid


I want a view to come in from the right when pressing a component. The issue is that the Vstack that contains the LazyVGrid slides into the screen after the LazyVGrid components appear (w/o a transition). The transition and animation are on the outermost component (the Vstack).

ZStack{
//other View
 if(showNumPad){
  AddExpenseNumPadView()
   .frame(maxWidth: 355)
   .background(Color.green)
   .transition(.move(edge: .trailing))
   .animation(.easeInOut(duration: 2.0))
}
}

Please help I am not sure what the issue is and I have been spending way too much on it. Thank you!

I tried changing where the transition and animation go a bunch, and I tried putting a delay.

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img