Changing UITableView's section header/footer title without reloading the whole table view

前端 未结 10 639
轮回少年
轮回少年 2020-12-03 04:47

Is there any way to reload the section header/footer of a table view without calling [tableView reloadData];?

In fact, I want to show the number of cel

10条回答
  •  半阙折子戏
    2020-12-03 05:28

    This is how you do it in Swift 3.0

    tableView.beginUpdates()
    tableView.headerView(forSection: indexPath.section)?.textLabel?.text = "Some text"
    tableView.endUpdates()
    

提交回复
热议问题