Attached UISearchBar doesn't work with dark barTintColors

Originator:futuretap
Number:rdar://33145534 Date Originated:06-Juli-2017 12:57 AM
Status:Open Resolved:
Product:iOS + SDK Product Version:11.0 beta 2
Classification:UI/Usability Reproducible:Always
 
Summary:
When using the new method to attach search bars by setting navigationItem.searchController the search field displays black text on black background if the navigation bar uses a dark barTintColor (less than 50% brightness).

Steps to Reproduce:
Build and run the attached sample project and scroll down to reveal the search bar

Expected Results:
The search field background should be only slightly darker than the navigation bar background.

Actual Results:
The search field background is almost black.

Version:
11.0 beta 2

Notes:
Interestingly, when manually configuring a UISearchBar (or via tableHeaderView) with UISearchBarStyleMinimal to a dark background, the search field is rendered correctly with a slightly darker color.

See also: rdar://33144701 (feature request to let us specify the placeholder and text colors of the search field)

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!