UITableView headers animate when adding/deleting rows if set to auto dimension.

Originator:ez46
Number:rdar://18099964 Date Originated:
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 8.0 (12A4345d)
Classification:Serious Bug Reproducible:Yes
 
Summary:
After setting the tableView.sectionHeaderHeight to UITableViewAutomaticDimension and settings an estimatedSectionHeaderHeight all the headers will animate from 0 height to their actual height when you add or delete a row from the table.

Steps to Reproduce:
Create a tableView.
Add 3 sections (so there are more headers)
Set the sectionHeaderHeight to UITableViewAutomaticDimension
Set estimatedSectionHeaderHeight to 50
Add buttons to add and delete rows from section 1.
Tap buttons.

Expected Results:
Rows should animate in or out while the rest of the table remains static.

Actual Results:
Rows animate in or out but all the headers animate from 0 to their header height resulting in a very odd looking expanding table.

Version:
iOS 8.0 (12A4345d)

Notes:


Configuration:
iPhone 5

Comments

Causes fatal error

This issue can potentially cause apps to crash if they return nil for -tableView:viewForHeaderAtSection:

I've uploaded an example project here: http://files.runloop.com/XAvh/TableViewTest.zip

Tapping the "Remove Row" row on iPhone 5 will crash the app as it would appear the UITableView is attempting to insert all the header views into an array but one is nil.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!