SwiftUI NavigationLink Hide Arrow

blackops picture blackops · Oct 11, 2019 · Viewed 10.3k times · Source

Is there a way to hide the arrow to the right of the navigation link view that is automatically added?

I want to show an image grid using NavigationView -> List -> HStack -> NavigationLink_1 - NavigationLink_2

The NavigationLinks have arrows and it looks weird enter image description here

Answer

Vladimirs Matusevics picture Vladimirs Matusevics · Jan 21, 2020

The way it worked for me:

List { 
    ForEach(elements) { element in
        ZStack {
            CustomView(element: element)
            NavigationLink(destination: DestinationView()) {
                EmptyView()
            }.buttonStyle(PlainButtonStyle())
        }
    }
}