iPhone UITableView : How to remove the spacing between sections in group style table?

后端 未结 9 987
南方客
南方客 2021-02-05 09:33

I am creating a table view in which there are 10 sections, all having a header view but no cells. So, in short, my table view will display 10 header views only; there will be no

9条回答
  •  情深已故
    2021-02-05 09:55

    Try using this :

    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 
    {
       return 0;
    }
    

    As mentioned in comments, try using this :

     self.tableView.rowHeight = 0;
    

提交回复
热议问题