Post

Replies

Boosts

Views

Activity

Reply to How to customise or remove separators from List in SwiftUI
Meanwhile here's all you need to trick SwiftUI into removing separators from List (at least as of Xcode 12 beta 1 and iOS 14.0 beta 1) 👌 extension List {     @ViewBuilder func noSeparators() -> some View {         #if swift(>=5.3) // Xcode 12         if #available(iOS 14.0, *) { // iOS 14             self             .accentColor(Color.secondary)             .listStyle(SidebarListStyle())             .onAppear {                 UITableView.appearance().backgroundColor = UIColor.systemBackground             }         } else { // iOS 13             self .listStyle(PlainListStyle())             .onAppear {                 UITableView.appearance().separatorStyle = .none             }         }         #else // Xcode 11.5         self .listStyle(PlainListStyle())         .onAppear {             UITableView.appearance().separatorStyle = .none         }         #endif     } }
Jul ’20