首页 > 其他 > 详细

TableView Section 高度

时间:2015-08-25 23:29:19      阅读:274      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!