SwiftUI: Transition insertion does not work inside NavigationView

Viewed 283

When some view inside a NavigationView has a transition specified, only the removal works, the insertion one won't work.

NavigationView {
  VStack {
    if on {
      Text("a").transition(.slide)
    }
    Button("Show") { withAnimation { self.on.toggle() } }
  }
}

If you remove the NavigationView, then the text will properly slide when appearing.

Does anyone know how to work around it?

0 Answers
Related