UISearchBar won't cover the status bar area when present UISearchController from view controller that its navigation bar is translucent.

Originator:pitiphong.ph
Number:rdar://19533117 Date Originated:21-Jan-2015
Status:Open Resolved:
Product:Xcode/iOS Product Version:6.1.1/8.1
Classification:Other Bugs Reproducible:Always
 
Summary
UISearchBar won't cover the status bar area when present UISearchController from view controller that its navigation bar is translucent.

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!