一竭贩、tableView 組頭與組尾
- 自動生成了組尾蚜印,去掉組尾
- 組尾與組頭的自定義都要繼承自UITableViewHeaderFooterView,雖然代理方法要求返回的是UIView
- ///注冊:
register(KRGoldCoinMallFooter.classForCoder(), forHeaderFooterViewReuseIdentifier: "FOOTERVIEW")
- 組尾高度:
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.1
}
- 組尾的獲攘袅俊:
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: HEADERVIEW) ?? UIView()
headerView.backgroundColor = UIColor.c_0xf8f8f8
return headerView
}
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者