Skip to content

Instantly share code, notes, and snippets.

@don1138
Last active February 15, 2021 15:48
Show Gist options
  • Select an option

  • Save don1138/ab403198f28782c325be7a97440b498d to your computer and use it in GitHub Desktop.

Select an option

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

donly commented Dec 25, 2020

Copy link
Copy Markdown

Hi, not working any more on iOS 14.x

@piyushpatil

Copy link
Copy Markdown

not working any more on iOS 14.x

@don1138

don1138 commented Feb 15, 2021

Copy link
Copy Markdown
Author

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