I am trying to create an animation that is triggered by a change in a different value. However, the animation is not working. The view just "pops-up" immediately instead of using it's transition.
Code Block struct ContentView: View { @State private var count = 0 @State private var isShowing = false var body: some View { VStack { if isShowing { Text("SHOWING") .transition(.scale) } Button("Increase") { count += 1 } } .frame(width: 200, height: 200) .onChange(of: count, perform: { (count) in withAnimation { isShowing.toggle() } }) } }