#StackBounty: #ios #uitableview #uikit #ios15 How to remove section header separator in iOS 15

Bounty: 50

In iOS 15, UITableView adds a separator between a section header and the first cell:

enter image description here

How can I hide or remove that separator?

A few notes:

  1. The header is a custom view returned from tableView(_:viewForHeaderInSection:).
  2. When looking at the view debugger, I can see that the extra separator is actually a subview of the first cell, which now has a top and a bottom separator.
  3. Other than setting tableView.separatorInset to change the inset of cell separators, this is a completely standard table view with no customizations.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.