TableView Section 高度

用 

  self.tableView.sectionHeaderHeight = 35
  self.tableView.sectionFooterHeight = 0

 设置的高度 第一个section 含有标题时 高度会比其它含有title的section高

 

使用 TableViewDelegate 协议里面的一个方法替换

    override func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
    return 30
}

 所有高度就都一样了

 

footer应该是同理 

 
    override func tableView(tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
        return 0
    }

 

posted @ 2015-08-25 22:33  baaingSheep  阅读(523)  评论(0编辑  收藏  举报