When I add a UISearchController to a UINavigationItem from an UINavigationController; it becomes white when the view loads and changes to the color specified when the user c
This appears to be a bug in iOS 13.1. Specifically, there is a new iOS 13 specific appearance (UINavigationBarAppearance) for navigation bars which specifies the appearance when the scroll view is scrolled to the top, along with the default state. Normally changes like this only go into effect when the app is built with the corresponding SDK (iOS 13.1). However, there seems to be a bug where the behavior also occurs when an app is built using the iOS 12 SDK.
See: https://developer.apple.com/documentation/uikit/uinavigationbarappearance
Update: There is a workaround here: https://itnext.io/fixing-issues-caused-by-future-sdks-ae0896384abf
Essentially, if your app is running on a device running iOS 13, it's possible to create instances of the new classes via NSClassFromString() in swift, then use a bit of objective-c runtime magic to configure the navigation bar.