UITableview重新加载SectionHeader而不是部分中的单元格

Kyl*_*uth 8 iphone cocoa-touch objective-c uitableview ios

我有一个tableview,我想重新加载(并更改高度)sectionHeader而不是本节内的单元格.我想这样做的原因是因为我在标题上使用淡入淡出动画,如下所示:

[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:0]   
    withRowAnimation:UITableViewRowAnimationFade];
Run Code Online (Sandbox Code Playgroud)

但与此同时,我在该部分添加了一个单元格

[self.tableView insertRowsAtIndexPaths:
    @[[NSIndexPath indexPathForRow:0 inSection:0]]
    withRowAnimation:UITableViewRowAnimationRight];
Run Code Online (Sandbox Code Playgroud)

我希望能够保留UITableViewRowAnimationRight正在添加的单元格,但是当我重新加载Section时,淡入淡出动画会应用到整个部分.有没有办法只重新加载sectionHeader,而不是部分中的单元格?

Mun*_*ndi 5

只需创建2个单独的括号

[tableView beginUpdates];
[tableView endUpdates];
Run Code Online (Sandbox Code Playgroud)

对于两次插入/更改.