I can not get a NavigationLink
in SwiftUI. The button is visible, but unfortunately this is gray and can not be clicked.
Here is the code:
import SwiftUI
import Combine
struct ContentView: View {
var body: some View {
NavigationView{
NavigationLink(destination: Text("Detail for Test")) {
Text("Test")
}.navigationBarTitle("Select a user")
}
}
}
Does anyone know the problem?