I would like to change the font type and font size of a section header in a table view controller.
My code:
func tableView(tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) {
let header = view as! UITableViewHeaderFooterView
header.textLabel.textColor = UIColor.blackColor()
header.textLabel.font = UIFont(name: "Futura", size: 38)!
}
But this doesn't work. Any ideas?
from swift ios 8 change font title of section in a tableview
No comments:
Post a Comment