Sub*_*der 2 uitableview ios swift
我正在使用UITableView
分组并使用多个部分。我正在使用这些代码来隐藏部分的页脚。
self.tableView.estimatedSectionFooterHeight = 0
self.tableView.sectionFooterHeight = 0
public func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.0
}
public func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
Run Code Online (Sandbox Code Playgroud)
只有第 0 部分的页脚没有被隐藏。
这是屏幕截图:
请帮忙!
如果您正在使用grouped tableview
,那么总会有页脚,并且它永远不会接受0 value
。但您可以返回0.5
或1
解决您的问题,无需覆盖viewForFooterInSection
归档时间: |
|
查看次数: |
2186 次 |
最近记录: |