I\'me using this code to add a footer to the TableView. It has 20 sections, and each section a few rows. There\'s a titleForHeaderInSection, and sectionForSectionIndexTitle
Swift 2.1.1 below works:
func tableView(tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let v = UIView()
v.backgroundColor = UIColor.RGB(53, 60, 62)
return v
}
func tableView(tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 80
}
If use self.theTable.tableFooterView = tableFooter there is a space between last row and tableFooterView.