Skip to content

Instantly share code, notes, and snippets.

@don1138
Last active February 15, 2021 15:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save don1138/ab403198f28782c325be7a97440b498d to your computer and use it in GitHub Desktop.
Save don1138/ab403198f28782c325be7a97440b498d to your computer and use it in GitHub Desktop.
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)
}
}
@donly
Copy link

donly commented Dec 25, 2020

Hi, not working any more on iOS 14.x

@piyushpatil
Copy link

not working any more on iOS 14.x

@don1138
Copy link
Author

don1138 commented Feb 15, 2021

Thanks for the notes. I've added "deprecated in iOS 14" to the title of this gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment