SwiftUI – NavigationLink cell in a Form stays highlighted after detail pop

In my case this behaviour appeared when using any Viewcontent (e.g. Text(), Image(), …) between my NavigationView and List/Form.

var body: some View {
    
    NavigationView {
        VStack {
            Text("This text DOES make problems.")
            List {
                NavigationLink(destination: Text("Doesn't work correct")) {
                    Text("Doesn't work correct")
                }
            }
        }
    }
}

Putting the Text() beneath the List does not make any problems:

var body: some View {
    
    NavigationView {
        VStack {
            List {
                NavigationLink(destination: Text("Does work correct")) {
                    Text("Does work correct")
                }
            }
            Text("This text doesn't make problems.")
        }
    }
}

This is definitely a XCode 12 bug. As more people report this, as earlier it gets resolved.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)