IOS不允许Header和Footer为0
但有时为方便写代码还是要有设置为0的时候,那么这时可以设置为0.0001,这样也就显示不出来了
1
2
3
4
5
|
-(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的headerview 的高度也是,如果设置成0.000001f的话,也是显示不出来的