ナビゲーション遷移

Swift

ContentView

struct ContentView: View {
    var body: some View {
        NavigationiStack {
            VStack {
                NavigationLink {
                    SecondView()  <--- 遷移先
                } lable: {
                    Text("SecondViewへナビ遷移")
                }
            }
        }
        .padding()
        .navigationTitle("画面1")
    }
}

SecondView

BACK