macOS NavigationStack 使用推送和弹出动画

Pet*_*isu 6 swiftui swiftui-animation swiftui-navigationstack

如何在macOS中设置 Push/Pop 动画NavigationStack?因为目前没有动画,我想推送/弹出控制器向右滑动(向左滑动),类似于AppStore应用程序

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")
                }
            }
        }
    }
}
Run Code Online (Sandbox Code Playgroud)