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, willDi
func tableView(tableView: UITableView,
viewForHeaderInSection section: Int) -> UIView? {
let hView = UIView(frame: CGRectMake(0, 0, tableView.frame.width, 44))
hView.backgroundColor = UIColor.whiteColor()
let hLabel = UILabel(frame: CGRectMake(15, 2, 30, 44))
hLabel.font = UIFont(name: "YOUR_FONT_NAME", size: 30)
hLabel.textColor = kiExtremeOrange
hLabel.text = alphabets[section]
hView.addSubview(hLabel)
return hView
}
Note:First import the font you want to use