UITableViewStyle.grouped 时, 头部默认

2017-11-06  本文已影响29人  冉俊

UITableViewStyle.grouped 时, 头部默认高度

<font color=red size=5>注意代码顺序</font>

self.backgroundColor = backgroundColorGray
self.separatorColor = self.backgroundColor
self.dataSource = self
self.delegate = self
self.tableFooterView = UIView()
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
        return 270
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
        return 0.001
}
上一篇 下一篇

猜你喜欢

热点阅读