UISearchBar does not update text color after being shown

Number:rdar://34376509 Date Originated:11-Sep-2017 03:30 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:11.0
Classification:UI/Usability Reproducible:Always
When updating the barStyle on a UISearchBar that is shown using the new iOS 11 style, the text color does not change to match the new style.

This occurs when changing from any UIBarStyle to any different one.

Steps to Reproduce:
See the attached sample project

Create a ViewController in a NavigationController
Create a UISearchController and add it to the ViewContorller’s NavigationItem
Some time after viewWillAppear, update the barStyle on the SearchControllers SearchBar
Notice that the text color does not change.

Expected Results:
The text color should update to match the new barStyle. See attached file “3. Expected.PNG”

Actual Results:
The text color stays the same as it started out with. See attached file “2. Actual.PNG”




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!