UISearchController sets wrong contentInsets when navigation bar is opaque

Originator:stephen.groom
Number:rdar://22048303 Date Originated:29-Jul-2015 10:47 AM
Status:Open Resolved:
Product:iOS SDK Product Version:8.4
Classification:Other Bug Reproducible:Always
 
This is a duplicate of rdar://20942583

Summary
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.

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

Additional Info:
The duplicated ticket references a UITableView specifically but this issue is also present using a UICollectionView with the searchBar displayed as a section header

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!