Blank first UITableView section header

后端 未结 2 1684
遥遥无期
遥遥无期 2021-01-24 17:22

I have 2 sections in my UITableView. I\'d like my first header to be nonexistant, no space, no nothing. The first cell touches the top of the screen. I\'d like a custom section

2条回答
  •  闹比i
    闹比i (楼主)
    2021-01-24 17:33

    Look for the

    - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section

    method of UITableView.

    You can return 0; for the first section.

提交回复
热议问题