Created
December 1, 2020 19:01
-
-
Save JoshHrach/928ee0b7583c04499c5f495d56ece9eb to your computer and use it in GitHub Desktop.
NavigationLink bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | |
}) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Video of the issue https://twitter.com/JoshHrach/status/1333848682337169408