contentInset moves UITableView fixed UI

Number:rdar://19489536 Date Originated:15-Jan-2015 01:44 PM
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 8.2
Classification:UI/Usability Reproducible:Always
When setting contentInset on UITableView (but, importantly, not scrollIndicatorInsets) section headers and the index are moved down below the inset. This is rarely the desired behavior.

Steps to Reproduce:
Add a subtle view to the top of a table view, like a custom pull to refresh control. UITableView calls it out and make sit obvious.

Expected Results:
Those views should move to match the scrollIndicatorInsets instead, since that property is indicative of non visible space. Or, at the very least, an additional insets property to control the headers and index position more directly.

Actual Results:
Ugly misplaced views.

You could argue that for a table view, the tableHeaderView would be a more appropriate way to add a view above the table. However, this limits reusing code between regular scroll views, collection views and table view. Further, because UISearchBar has special behavior when it is the one and only table header view.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at 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!