SwiftUI 2 broke a part of my app that relied on a clear background for a List section header. Previously I relied on this line to make the list sections clear. Does anyone know how to accomplish this in SwiftUI 2?
UITableViewHeaderFooterView.appearance().tintColor = .clear
Here is a sample that would work in SwiftUI 1:
struct ContentView: View {
var body: some View {
List {
Section(header:
Text("List Header")
) {
Text("Hi")
}
.listRowBackground(Color.clear)
}
.onAppear {
UITableViewCell.appearance().backgroundColor = UIColor.clear
UITableViewHeaderFooterView.appearance().tintColor = .clear
}
}
}
Desired: List Header
should be transparent and not grey.