I found an answer in the console output. Use this code in the header function:
func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView?
Do not return your headerCell
, or your reusable identifier. Return the reuseIdentifier.contentView
. For me it’s: return headerCell!.contentView
.