How can we hide the tableHeaderView and tableFooterView?

前端 未结 8 503
我在风中等你
我在风中等你 2020-12-08 10:32

I have two buttons which i add it in one in table-footer and other one in table-header,i know how to hide the headerview of the table using this codetable.tableHeader

相关标签:
8条回答
  • 2020-12-08 11:03

    removeFromSuperview or set nil not work when "reloadData"

    self.tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 0.0f, 0.001f)];
    [self.tableView reloadData];
    
    0 讨论(0)
  • 2020-12-08 11:06
    [self.tableView.tableHeaderView removeFromSuperview];
    self.tableView.tableHeaderView = nil;
    [self.tableView reloadData];
    
    0 讨论(0)
提交回复
热议问题