Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

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
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #background #color #uitableview #section #header
ADD COMMENT
Topic
Name
7+6 =