Content insets are not automatically adjusted for programmatically created table view

Originator:and.mikhaylov
Number:rdar://22683028 Date Originated:14-Sep-2015 03:38 PM
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 9.0 GM
Classification:Other Bug Reproducible:Always
 
Summary:
UIKit does not automatically adjust content insets when table view added programmatically in viewDidLoad.

Steps to Reproduce:
1. Create a custom subclass of UIViewController
2. Create UITableView within custom UIViewController subclass and add it as subview within viewDidLoad method
3. Add UINavigationController in Storyboard and make it initial controller.
4. Add UIViewController in storyboard and assign it custom class created on step 1
5. Set earlier created view controller as root view controller of navigation controller
6. Run the app and observe that table view does not receive the content inset adjustments to accommodate navigation bar.

Expected Results:
Automatically adjusted content inset of UITableView

Actual Results:
Content inset is not automatically adjusted for UITableView

Regression:
It does not occur on iOS 8 or earlier versions. Content insets were always automatically adjusted for the first scrollview-based subview.

Notes:

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!