SwiftUI页面跳转

NavigationView导航栏,NavigationLink页面跳转,navigationBarTitle导航Title
代码如下:

struct ContentView: View {
    var body: some View {
        NavigationView {
            List(landmarkData) { Landmark in
                NavigationLink(destination: LandmarkDetail(landmark: Landmark)) {
                    LandmarkRow(landmark: Landmark)
                }
            }
        }.navigationBarTitle("Landmarks")
    }
}

你可能感兴趣的:(SwiftUI页面跳转)