【问题标题】:How to get rid of an empty UITableCell appearing top and in between tableview如何摆脱出现在表格顶部和表格视图之间的空 UITableCell
【发布时间】:2020-10-12 16:25:16
【问题描述】:

I used below lines of code to get rid of the empty UITableview cells 但没有运气。任何帮助表示赞赏。

tableView.tableFooterView = UIView()
tableView.tableHeaderView = UIView()

【问题讨论】:

    标签: swift4 swift5


    【解决方案1】:

    你应该使用nil 而不是 UIView()

    tableView.tableHeaderView = nil
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-08
      • 2015-02-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-08
      • 1970-01-01
      • 2023-04-07
      相关资源
      最近更新 更多