swift ios 8 change font title of section in a tableview

前端 未结 11 1714
夕颜
夕颜 2021-01-31 08:29

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         


        
11条回答
  •  半阙折子戏
    2021-01-31 08:54

    There're several ways for you to archive your question by customizing the view in your storyboard, xib, tableViewCell, or you can write it by code.

    After your customization completed, you can use

    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
        let yourHeader = .....
    
        return yourHeader
    }
    

提交回复
热议问题