I am populating a UITableView from an array – lets call it sections. The numberOfSectionsInTableView returns sections.count, except for a special case – if sections.count is 0, I return 1 (1 is the minimum number of sections that should ever be returned by numberOfSectionsInTableView). I return nil as the section header in this case, so the UITableView looks empty.
When a new item is added to my dataSource, I manually insert a new row. I also check if a new section is required, and if so I add it to sections and insert the new section. But here is where my ‘special case’ causes problems.
When adding the first item, to the first section, I don’t want to add a new section (because there is already one section minimum at all times). So, I just insert the row.
The row animation insertion seems correct, but I get a strange half-loaded header:

All I really need to do is make the UITableView reload the header when the first row is inserted. But I don’t want to lose the insertion animations by simply reloading the tableview or the section.
Any ideas?
I think that you are looking for
-reloadSections:withRowAnimation:.After you add or remove the special case of section 0, you can call:
Hope that helps.