Skip to content

Instantly share code, notes, and snippets.

View AntonShapoval's full-sized avatar

Anton Shapoval AntonShapoval

View GitHub Profile
@don1138
don1138 / list-separator-color.swift
Last active February 15, 2021 15:48
Set custom color on List Separator in SwiftUI (deprecated in iOS 14)
var body: some View {
// Add this right after declaring body view:
UITableView.appearance().separatorColor = UIColor(red:(128/255), green:(128/255), blue:(128/255), alpha: 1)
return NavigationView{
List {}
.navigationBarTitle("", displayMode: .inline)
.navigationBarHidden(true)
}