0

Is there a way to remove the arrow and separator line from a List in a SwiftUI App for iOS 14?

enter image description here

I tried this but it does not work:

init() {
       UITableView.appearance().separatorStyle = .none
       UITableViewCell.appearance().backgroundColor = .clear
       UITableView.appearance().backgroundColor = .clear
       UITableViewCell.appearance().selectionStyle = .none
       UITableViewCell().accessoryType = .none
    }

Inside my List there is a ForEach and a NavigationLink.

Bests.

Edit:

My ForEach is this:

ForEach(HttpResponseHolder.shared.exoplanetsOrderedByMassWithImage.filter({ searchText.isEmpty ? true : $0.pl_name!.contains(searchText)})) { exoplanet in
                  NavigationLink(destination: ExoplanetDetailView(exoplanet: exoplanet)) {
                    ExoplanetCard(exoplanet: exoplanet)
                  }.buttonStyle(PlainButtonStyle())
              }.
I Don't Tell
  • 264
  • 1
  • 15

0 Answers0