Is there a way to remove the arrow and separator line from a List in a SwiftUI App for iOS 14?
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())
}.