Fang Yang
Fang Yang

Reputation: 143

Is there a possible way to reload section header view separate from the table cells in tableview

I've tried to use

[_tableView reloadSections:<#(NSIndexSet *)#> withRowAnimation:<#(UITableViewRowAnimation)#>];

But it will reload the table cells belong to the section which I don't want.

I also tried to provide the section header view by

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section

and I keep a reference. It didn't work either.

Upvotes: 3

Views: 1153

Answers (1)

Rob Napier
Rob Napier

Reputation: 299345

Did you mean viewForHeaderInSection or is the typo in your code? If you have a reference to the section header view and you modify the view, it should update in the table. If you make a change that the view can't recognize as requiring a redraw, you may have to call [headerView setNeedsDisplay].

Upvotes: 1

Related Questions