Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 867 Bytes

navigation.md

File metadata and controls

42 lines (32 loc) · 867 Bytes

Navigation

Example 1

Screen Shot 2023-03-14 at 8 40 33 PM

try? it out

import SwiftUI

struct DetailView: View {
    var body: some View {
        Text("Detail View")
            .navigationBarTitleDisplayMode(.inline)
            .navigationTitle("Detail View")
    }
}

struct ContentView: View {
    var body: some View {
        NavigationStack {
            NavigationLink("Show detail view") {
                DetailView()
            }
            .navigationTitle("Home View")
        }
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

Resources