Skip to content

Instantly share code, notes, and snippets.

@ra9r
Created September 25, 2022 04:10
Show Gist options
  • Select an option

  • Save ra9r/7359ff64e6dd9c2e8f7bada31f1bbdc2 to your computer and use it in GitHub Desktop.

Select an option

Save ra9r/7359ff64e6dd9c2e8f7bada31f1bbdc2 to your computer and use it in GitHub Desktop.
Styling SwiftUI List backgrounds
List {
}
.onAppear {
// If you set the underlying UITableView appearance to "clear"
// it will allow the view's background colors to show through.
UITableView.appearance().backgroundColor = UIColor.clear
UITableViewCell.appearance().backgroundColor = UIColor.clear
}
@ra9r
Copy link
Copy Markdown
Author

ra9r commented Sep 26, 2022

This is the old way to do things. On iOS 16 and up it no longer works and the new/better way is in this gist.

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