UITableView get titleForHeadersInSection swift
问题 I want to set the title of the header in the section of UITableView. What is the syntax in swift to set the title of the header in the section. func tableView( tableView : UITableView, titleForHeaderInSection section: Int)->String { switch(section) { case 2: return "Title 2" break default: return "" break } } func tableView (tableView:UITableView , heightForHeaderInSection section:Int)->Float { var title = tableView.titleForHeaderInSection[section]; if (title == "") { return 0.0; } return 20