Skip to content

Instantly share code, notes, and snippets.

@JoshHrach
Created December 1, 2020 19:01
Show Gist options
  • Save JoshHrach/928ee0b7583c04499c5f495d56ece9eb to your computer and use it in GitHub Desktop.
Save JoshHrach/928ee0b7583c04499c5f495d56ece9eb to your computer and use it in GitHub Desktop.
NavigationLink bug
struct ContentView: View {
var body: some View {
NavigationView {
List {
NavigationLink(destination: Text("Top Level")) {
Text("Top Level Link")
}
NavigationLink(destination: detailView) {
Text("Show Sub Links")
}.isDetailLink(false)
}
Text("Tap link in sidebar")
}
}
var detailView: some View {
List {
NavigationLink(destination: Text("Sub Link 1")) {
Text("Sub Link One")
}.isDetailLink(true)
NavigationLink(
destination: Text("Sub Link 2"),
label: {
Text("Sub Link Two")
})
}
}
}
@JoshHrach
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment