I have this code to display a list of custom rows.
struct ContentView : View {
var body: some View {
VStack(alignment: .leading) {
List(1
I started a project to solve this in iOS14 since the iOS 13 workarounds no longer work. It allows setting the separator style, separator color, and separator inset.
Hide separators on the List
List { }
.listSeparatorStyle(.none)
Show a single divider line with configurable color and insets
List { }
.listSeparatorStyle(.singleLine, color: .red, inset: EdgeInsets(top: 0, leading: 50, bottom: 0, trailing: 20)
https://github.com/SchmidtyApps/SwiftUIListSeparator