Answers for "uitableview section background color"

0

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
}
Posted by: Guest on December-08-2020

Code answers related to "uitableview section background color"

Code answers related to "Swift"

Browse Popular Code Answers by Language