TableView Header/Footer Font in Grouped Table (Swift)

Assuming that you provided the string for the section title in this method:

func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {

But in a grouped tableview, that string is changed to all caps. To remove the all caps, try adding one of these two lines in the willDisplayHeaderView method:

header.textLabel?.text = header.textLabel!.text!.capitalizedString
header.textLabel?.text = header.textLabel!.text!.lowercaseString

The first one will capitalize the first letter of every word and the second will make everything lowercase. If you don't want either of those you could add the string directly:

header.textLabel?.text = "Here are a few options for you. Select to learn more"

Swift 4

use this delegates:

func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
        let label: UILabel = {
            let label = UILabel()

            label.textAlignment = .right
            label.textColor = .white
            label.backgroundColor = .clear
            label.font = UIFont.systemFont(ofSize: 20)

            return label
        }()
        return label
    }

and don't forget to set height for header:

func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
        return 70
    }

hope this help.