Since NavigationView has been deprecated, what is the new way to show the navigation bar with a navigation title in SwiftUI? The code below doesn't show the nav bar:
var body: some View {
Button {
showFullscreenModal.toggle()
} label: {
Text("Test Fullscreen")
}.sheet(isPresented: $showFullscreenModal) {
Text("Modal content").navigationTitle("Modal title").toolbar {
Button {
self.showFullscreenModal = false
} label: {
Text("Cancel")
}
}
}
}
Am I doing something wrong?