I have a UISearchBar and for some odd reason whenever the search bar is tapped on the status bar color changes from black to white. I don't want the status bar color to change. Any ideas? Thanks.
The accepted answer here seems to indicate that the UISearchBar
sends a call to its "parent" UINavigationController
when it begins editing.
Therefore, you seem to have 2 options:
You could simply override the tintColor
for the UINavigationController
for you UITableViewController
, or
You could write a simple UINavigationController
subclass that overrides -preferredStatusBarStyle
, returning the desired style.
It looks like #1 gives you what you need with minimal fuss/code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With