码迷,mamicode.com
首页 > 其他好文 > 详细

TableView Section 高度

时间:2015-08-25 23:32:34      阅读:108      评论:0      收藏:0      [点我收藏+]

标签:

用 

  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
    }

 

TableView Section 高度

标签:

原文地址:http://www.cnblogs.com/baaingSheep/p/4758909.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!