umhan35 / react-native-search-bar

The high-quality iOS native search bar for react native.
MIT License
861 stars 207 forks source link

[iOS 13] Text and icon's color is different in darkmode #166

Closed KostasKostogloy closed 4 years ago

KostasKostogloy commented 4 years ago

iOS 13 introduced dark mode (https://support.apple.com/en-us/HT210332).

If the user has it enabled the appearance of the searchbar changes (icon and text color): image

I am aware that we can change the default text color with the textColor prop but how can we change the icon (magnifying glass) color?

iRoachie commented 4 years ago

Isn't this the correct behaviour? This is what the settings from iOS shows

image

And this is this library:

image

KostasKostogloy commented 4 years ago

@iRoachie We don't use dark mode on our app and as a result the lighter gray icon fades (as you can see on the screenshot).

If there's no way to opt out of dark mode adjustments on the app's level, we should at least be able to override the icon to keep it consistent regardless of user using darkmode or not.

iRoachie commented 4 years ago

As far as I know, the icon is an image https://stackoverflow.com/questions/27014529/how-to-change-the-color-of-the-uisearchbar-icon. If you don't use dark mode in your app you can simply opt-out of it. https://stackoverflow.com/questions/56537855/is-it-possible-to-opt-out-of-dark-mode-on-ios-13

KostasKostogloy commented 4 years ago

@iRoachie I see. I must opt-out from darkmode from my app. Thanks for pointing me to the right direction 🍻