change background color of uitableview section header
func tableView(_ tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) { (view as! UITableViewHeaderFooterView).contentView.backgroundColor = UIColor.black.withAlphaComponent(0.4) (view as! UITableViewHeaderFooterView).textLabel?.textColor = UIColor.white }