macOS NavigationStack use push and pop animation
Asked Answered
P

0

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")
                }
            }
        }
    }
}
Prouty answered 2/12, 2022 at 11:28 Comment(1)
it simply sucks. wait a few months for WWDC and hope for the best...Marcelinomarcell

© 2022 - 2025 — McMap. All rights reserved.