i have an existing UINavigationController and i am pushing a UIHostingController with a SwiftUI View that contains a List as its top-level element.
The List contains several rows created using NavigationLink where tapping a row navigates the user to a detail view.
Upon returning, however, the selected row remains highlighted.
The only workaround i have found is the rather ugly piece of code shown below:
This feel ridiculous and borderline insane to have to do for each row in the List.
is there a better way or are SwiftUI Lists just broken in iOS 14?
The List contains several rows created using NavigationLink where tapping a row navigates the user to a detail view.
Upon returning, however, the selected row remains highlighted.
The only workaround i have found is the rather ugly piece of code shown below:
Code Block swift List { ZStack { Button(action: {}) { Text("Detail") } NavigationLink(destination: DetailView()) { EmptyView() } } ... }
This feel ridiculous and borderline insane to have to do for each row in the List.
is there a better way or are SwiftUI Lists just broken in iOS 14?