【发布时间】:2017-11-10 17:32:33
【问题描述】:
我想更改剖面视图中页脚的背景颜色。 将背景颜色设置为白色。
我尝试了以下程序,但没有一个成功。
-
在
viewDidLoad()中添加代码let HEADER_HEIGHT = 100 tableView.tableHeaderView?.frame.size = CGSize(width: tableView.frame.width, height: CGFloat(HEADER_HEIGHT)). view.contentView.backgroundColor = UIColor.white in willDisplayHeaderView()更改了 xib 文件的颜色
-
heightForFooterInSectionoverride func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { if section > 1 { return 10 } return 0 }
请就这个问题向我提供意见。
【问题讨论】:
-
能否在section方法中为footer添加view的完整代码?
-
在你的图片中,节页脚是什么部分?
-
灰色空间是页脚
-
rajtharan-g - override func tableView(_ tableView: UITableView, willDisplayFooterView view: UIView, forSection section: Int) { } 该方法已弃用。您是否推断此方法
-
这是
UITableViewController还是添加了表格视图的UIViewController?表格视图是否填满屏幕?你在实现viewForFooterInSection方法吗?
标签: ios swift uitableview