swiftuinavigationview

SwiftUI NavigationLink Hide Arrow


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


Solution

  • The way it worked for me:

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