📌  相关文章
📜  更改 uitableview 部分标题的背景颜色 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:00:58.584000             🧑  作者: Mango

代码示例2
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
}