我在做的项目里有3个结构相同,但数据源不同的UITableView。
其中有一个源是需要搜索的,所以在视图中添加了tableHeaderView,但其它两个不需要,我该怎么隐藏它呐?

以下两种方式,tableHeaderView虽然不再显示了,但任然占用了和tableHeaderView相同的空白视图空间。

 

在stackoverflow上找到答案,方法太暴力了,有需要的去看原文。How can we hide the tableHeaderView and tableFooterView?

self.tableView.tableHeaderView = nil;

相关文章:

  • 2022-12-23
  • 2021-10-03
  • 2021-12-04
  • 2021-11-06
  • 2022-12-23
  • 2021-12-02
  • 2021-07-12
  • 2022-01-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2021-12-02
  • 2021-12-02
  • 2021-09-28
相关资源
相似解决方案