Updated for Xcode 14.2
If you have a NavigationLink
or Picker
that isn’t working, this usually happens because in some situations SwiftUI expects the containing view to be inside a NavigationStack
. So, you might see a list row showing a disclosure indicator, but for it to appear disabled.
To fix the problem, wrap your view in a NavigationStack
, like this:
NavigationStack {
NavigationLink {
Text("Detail view")
} label: {
Text("Show detail view")
}
}
SPONSORED Thorough mobile testing hasn’t been efficient testing. With Waldo Sessions, it can be! Test early, test often, test directly in your browser and share the replay with your team.
Sponsor Hacking with Swift and reach the world's largest Swift community!
Link copied to your pasteboard.