简体   繁体   中英

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.

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] .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM