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..
}

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-10
  • 2021-05-28
  • 2021-11-30
  • 2022-12-23
  • 2022-01-28
猜你喜欢
  • 2021-07-22
  • 2022-12-23
  • 2022-12-23
  • 2021-07-12
  • 2021-07-10
  • 2021-12-10
  • 2022-12-23
相关资源
相似解决方案