[英]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? 你的意思是viewForHeaderInSection
还是代码中的拼写错误? 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]
. 如果您进行了视图无法识别需要重绘的更改,则可能必须调用[headerView setNeedsDisplay]
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.