UISearchController sets wrong contentInsets when navigation bar is opaque

Number:rdar://20942583 Date Originated:13-May-2015 11:04 PM
Status:Duplicate/19533117/Open Resolved:
Product:iOS SDK Product Version:8.3
Classification:Serious Bug Reproducible:Always
UISearchController sets incorrect contentInsets for the presenting tableView (that includes the searchBar in its tableHeaderView) when presented from a view controller with an opaque navigation bar or if edgesForExtendedLayout is set to UIRectEdgeBottom or UIRectEdgeNone.

Steps to Reproduce
1. Open Documentation in Xcode
2. Search UISearchController
3. Select “Table Search with UISearchController (Obj-C and Swift)” sample project and open it
4. Open Main.storyboard
5. Select NavigationController and then Select its Navigation Bar
6. Turn off translucent property of the navigation bar.
7. Run the project and activate the search bar.

Expected Results
The presenting tableView should display the first cell (with "iPhone") right below the searchBar.

Actual Results
The first cell is partly covered by the searchBar.

see also rdar://20942430 (UISearchController doesn't cover the status bar area when navigation bar is translucent)


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!