简体   繁体   English

是否有可能重新加载与tableview中的表格单元格分开的节标题视图

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

相关问题 删除tableview部分header视图 - Delete tableview section header view tableview在section方法中看不到标题的tableview视图 - tableview doesn't see the tableview view for header in section method 当出现键盘并且相应的文本字段位于tableview的节标题中时,停止自动滚动table view - Stop auto scrolling of table view when keyboard appears and respective textfield was in tableview's section header 将节标题视图添加到表 - Add section header view to table 动画表格视图部分 header - Animating a table view section header 将Tap Gesture添加到表格视图中将使放置在表格标题视图中的UICollectionView单元格无法选择 - Adding tap Gesture to a tableview makes the UICollectionView cells not selectable which are placed in the table header view 使用表格标题视图子类中的ViewWithTag控制父表格视图 - Control parent tableview using ViewWithTag from the subclass of the table header view TableView将单元格显示为部分 - TableView displays cells as section GroupView,使用自我调整大小的标题,重新加载后,如果我向上滚动,tableview将跳转 - Group TableView,using self sizing section header,after reload,if I scroll upward ,tableview will jump 根据动态tableview中节标题中控件的操作确定节的索引 - Determine the index of a section from the action of a control in a section header in a dynamic tableview
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM