Posts

Post marked as solved
2 Replies
797 Views
If I run this code below , it will goto the detail view the first time, but will not goto the detail view again. It locks up the program with no errors.If I add a second item in the first List (0..<2) it runs fine. Any ideas ?Xcode 11.3import SwiftUIstruct ContentView: View { var body: some View { NavigationView { List { NavigationLink(destination: DetailView() .navigationBarTitle("Test Detail")){ Text("Goto Detail").foregroundColor(.blue) } .navigationBarTitle("Welcome") } } }}struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() }}struct DetailView: View { var body: some View { List(0 ..< 5) { item in Text("hello").foregroundColor(.blue) } }}
Posted
by cgodwin.
Last updated
.