UITableView resets section footer separator insets, after reload not last cell

Originator:adam.grzegorowski
Number:rdar://33454879 Date Originated:07/21/2017
Status:Open Resolved:
Product:iOS + SDK UIKit Product Version:iOS 9 and higher
Classification:UI/Usability Reproducible:Always
 
Summary:
UITableView resets section footer separator insets, after reload not last cell. Probably because UITableViewCell has two separators and one of them have wrong insets after `UITableView -reloadRows(at:with:)`. Also why footer view is reloaded after `UITableView -reloadRows(at:with:)`?

Steps to Reproduce:
1. Run sample app (UITableViewController with static cells)
2. Tap on first row in first section (which reload selected cell via `reloadRows(at:with:)`)

Expected Results:
Cell should be reloaded, separator on section's bottom shouldn't reset their insets.

Observed Results:
Magic separator appears below last row in section.

Notes:
When UITableView has more section, second separator will appear in every section.
In file "View hierarchy with magic separators.png" and "UITableView view hierarchy.png" shows two _UITableViewCellSeparatorView subview for every cell.

SampleApp:
https://www.dropbox.com/s/jhmick7xau9ft8e/separatorTest.zip

Separator bug.png:
https://www.dropbox.com/s/kee0ahdb9ex97q0/Separator%20bug.png

View without separator.png:
https://www.dropbox.com/s/2n256gee0xfxdm0/View%20without%20separator.png

View with separator after tap.png:
https://www.dropbox.com/s/potu4kvrd95slxp/View%20with%20separator%20after%20tap.png

View hierarchy with magic separators.png:
https://www.dropbox.com/s/bs3jjm3veh0u4tq/View%20hierarchy%20with%20magic%20separators.png

UITableView view hierarchy.png:
https://www.dropbox.com/s/she5xfa407eyp3g/UITableView%20view%20hierarchy.png

Comments


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!