iOS15 UITableView section header clear background loses transparency when header is pinned

515 Views Asked by At

I had pinned section headers with a clear background working in iOS14 using UIBackgroundConfiguration and the following code:

if #available(iOS 14.0, *) {
    var backgroundConfiguration = UIBackgroundConfiguration.listPlainHeaderFooter()
    backgroundConfiguration.backgroundColor = .clear 
    self.backgroundConfiguration = backgroundConfiguration
}

In iOS 15 this behavior is breaking - here is before scrolling:

Before Scrolling

And witness the sacrilege after scrolling and the header gets pinned (notice the section header background has gone from clear to grey, clearly a travesty):

After Scrolling Sacrilege

How do I fix this, returning once more to the delightful days of clear pinned section header backgrounds?

0

There are 0 best solutions below