I am still new to SwiftUI framework I am learning with HackingWithSwift for NavigationStack. I followed all the steps just one difference is my result of code. I ran without any error just like in video however I could not navigate to my Detail destination.
struct ContentView: View {
var destinations = ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
var body: some View {
NavigationStack {
List(destinations, id: \.self) { i in
NavigationLink(value: i) {
Label("Row \(i)", systemImage: "\(i).circle")
}
}
.navigationDestination(for: Int.self) { i in
Text("Detail \(i)")
}
.navigationTitle("Navigation")
}
}
}
My simulator show a List of Rows with Labels but I am unable to navigate. Could this by chance a bug because this is still new. Thank you in advance.