6

how to set the Push / Pop animation in macOS for a NavigationStack ? as currently there is no animation and i want to push / pop the controller sliding right (sliding left), similar to AppStore app

enum Nav {
    case a
}

struct MainView: View {
  
    var body: some View {
        NavigationStack {
            NavigationLink(value: Nav.a) {
                Text("Go to a")
            }
            .navigationDestination(for: Nav.self) { path in
                switch path {
                case .a:
                    Text("a")
                }
            }
        }
    }
}
Peter Lapisu
  • 19,915
  • 16
  • 123
  • 179

0 Answers0