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

tableview 分组显示返回footerviewt和headerView的高度不能为0的问题

时间:2015-11-25 10:07:06      阅读:114      评论:0      收藏:0      [点我收藏+]

标签:

IOS不允许Header和Footer为0

但有时为方便写代码还是要有设置为0的时候,那么这时可以设置为0.0001,这样也就显示不出来了

-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
 if(section == 1 )
  return 0.000001f;
 else return 44.0f; // put 22 in case of plain one..
}

  

tableview 分组显示返回footerviewt和headerView的高度不能为0的问题

标签:

原文地址:http://www.cnblogs.com/JerryBaxia/p/4993759.html

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