我想重新加载方法:func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String?,只刷新标题。但不想重新加载整个tableView。有什么办法吗?
发布于 2017-10-17 06:41:54
据我所知,您不能只重新加载sectionHeader。您可以做的最好的方法是使用
self.tableView.reloadSections([1], with: .automatic)
其中1是要刷新的部分的索引。传递您希望重新加载的任何部分的索引。
希望它能帮上忙
发布于 2017-10-17 06:52:38
let header = table.headerView(forSection: 0) as! URCutomHeaderView
header.someMethod()//configure new datahttps://stackoverflow.com/questions/46783812
复制相似问题