UITableview reloads the Header section, but not the cells in the section

I have a table where I want to reload (and change the height) only the Header section, but not the cells inside this section. The reason I want to do this is because I use the fade animation in the header, for example:

[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationFade]; 

But at the same time, I am adding a cell in this section with

 [self.tableView insertRowsAtIndexPaths: @[[NSIndexPath indexPathForRow:0 inSection:0]] withRowAnimation:UITableViewRowAnimationRight]; 

I would like to be able to save a UITableViewRowAnimationRight for the cell to be added, but when I reload the section, the fade animation applies to the entire section. Is there a way to simply reload sectionHeader, not the cells in the section?

+8
ios objective-c iphone cocoa-touch uitableview
source share
1 answer

Just create 2 separate brackets

 [tableView beginUpdates]; [tableView endUpdates]; 

for two inserts / changes.

+6
source share

All Articles