Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift - Reload UITableView Header

I'm try to reload only UITableView section header without reloading whole section or reload whole table. Thanks in advance.

note :- I follow answers of already answered question. But I still cannot figure out this.

like image 466
GayashanK Avatar asked May 09 '17 07:05

GayashanK


2 Answers

Use this method to reload section. Add index set of section which you want to reload.

tableView.reloadSections(IndexSet(0..<1), with: .automatic)
like image 77
AkBombe Avatar answered Nov 09 '22 13:11

AkBombe


There is no standard method to do that, you can use tableView:viewForHeaderInSection: function to get the section header from UITableView and do the updates.

like image 22
user3608500 Avatar answered Nov 09 '22 14:11

user3608500