How to hide first section header in UITableView (grouped style)

前端 未结 15 943
[愿得一人]
[愿得一人] 2020-12-07 11:15

As the design of table views using the grouped style changed considerably with iOS 7, I would like to hide (or remove) the first section header. So far I haven\'t managed to

15条回答
  •  鱼传尺愫
    2020-12-07 11:49

    Use this trick for grouped type tableView

    Copy paste below code for your table view in viewDidLoad method:

    tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, tableView.bounds.size.width, 0.01f)];
    

提交回复
热议问题