How to make transparent the header title of tableview en swift ios
<p>I'm actually using a table view for display some datas and I'm overriding <code>willDisplayHeaderView</code> to add a Custom style for the header. All is working fine except that I can not change the background color of the title header. Here is my code: </p>

<pre><code>override func tableView(_ tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int)
{
    view.backgroundColor = UIColor.clear
    let title = UILabel()
    title.font = UIFont(name: "System", size: 22)
    title.textColor = UIColor(rgba: "#BA0B23")
    title.backgroundColor = UIColor.clear

    let header = view as! UITableViewHeaderFooterView
    header.textLabel?.font=title.font
    header.backgroundColor = UIColor.clear
    header.textLabel?.textColor=title.textColor
    header.textLabel?.textAlignment = NSTextAlignment.center
    let sepFrame = CGRect(x: 0, y: header.frame.size.height-1, width: header.frame.size.width, height: 1)
    let seperatorView = UIView(frame: sepFrame)
    seperatorView.backgroundColor = UIColor(rgba: "#BA0B23")
    header.addSubview(seperatorView)
}
</code></pre>

<p>I don't know what I'm doing wrong, some help would be appreciated. Thank you </p>