Brian M
Brian M

Reputation: 3932

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

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?

Upvotes: 0

Views: 583

Answers (0)

Related Questions