其他代理方法的使用
1、組標(biāo)題設(shè)置
// 組頭標(biāo)題
optional public func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? // fixed font style. use custom view (UILabel) if you want something different // 固定的字體樣式,想要做一些不同的就使用自定義視圖
// 組尾標(biāo)題
optional public func tableView(tableView: UITableView, titleForFooterInSection section: Int) -> String?
代碼體現(xiàn)
/* 使用這種方式設(shè)置的組頭和組尾標(biāo)題的字體樣式都是統(tǒng)一的,不能進(jìn)行自定義 */
// 設(shè)置組頭標(biāo)題
func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
return "\(section)組組頭"
}
// 設(shè)置組尾標(biāo)題
func tableView(tableView: UITableView, titleForFooterInSection section: Int) -> String? {
return "\(section)組組尾"
}
效果圖

Snip20160602_28.png