UISearchController doesn't cover the status bar area when navigation bar is opaque

Originator:futuretap
Number:rdar://20942430 Date Originated:13-May-2015 10:56 PM
Status:Duplicate/19533117/Open Resolved:
Product:iOS SDK Product Version:8.3
Classification:Serious Bug Reproducible:Always
 
This is a duplicate of rdar://19533117

Summary
UISearchBar won't cover the status bar area when presented using UISearchController from a view controller with an opaque navigation bar. The issue can also be reproduced by setting edgesForExtendedLayout 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 (I use Swift version)
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
Search bar background cover the status bar area.

Actual Results
Search bar background doesn’t cover the status bar area. It’s transparency and I can see the table view content beneath the status bar content.

Regression


Notes
I also implement positionForBar(bar%3A UIBarPositioning) -> UIBarPosition method and return .TopAttached when search controller is active. I look at view hierarchy in Xcode View Debug and found that the UISearchBarBackground view (internal view of the UISearchBar) height is 64.0 point but the _UISearchBarContainerView view (also internal of UISearchBar and also be the UISearchBar’s superview) height is 44.0 and is clip to bounds.

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!