【发布时间】:2015-08-02 11:44:26
【问题描述】:
我正在制作一个自定义的 uitableview。但是第一部分的标题比其他部分大。
代码如下:
func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
var header = UIView(frame: CGRectMake(0, 0, tableView.bounds.width, 30))
header.backgroundColor = UIColor(red: 223/255.0, green: 170/255.0, blue: 128/255.0, alpha: 1.0)
return header
}
我该如何解决这个问题?
【问题讨论】:
-
你在你的代码中实现了
- tableView:heightForHeaderInSection:吗? -
不,我没有,我会试试的。
-
我试过了,它有效,谢谢会在 4 分钟内选择你的答案(堆栈交换不会让我立即选择它)
标签: uitableview swift layout