Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS 13.0+ dark mode displays white text color for openAutocompleteModal queries on a light gray background #264

Open
Wmeng98 opened this issue Nov 16, 2019 · 10 comments · May be fixed by #267

Comments

@Wmeng98
Copy link

Wmeng98 commented Nov 16, 2019

Makes the text unreadable in this case. Maybe we could change the background color for the modal depending on theme to support IOS 13.0+?

Thanks!

@Wmeng98 Wmeng98 changed the title Text for openAutocompleteModal is white instead of the expected (black) IOS 13.0+ displays white text color for openAutocompleteModal queries on a light gray background Nov 16, 2019
@Wmeng98 Wmeng98 changed the title IOS 13.0+ displays white text color for openAutocompleteModal queries on a light gray background IOS 13.0+ dark mode displays white text color for openAutocompleteModal queries on a light gray background Nov 16, 2019
@AlexBlake
Copy link

AlexBlake commented Nov 22, 2019

Can confirm from a TesFlight build:
Device: iPhone XR
iOS Version: 13.1.3

white_text

@AlexBlake
Copy link

Looking into things, the SDK for IOS provides properties for controlling display colour, to further @Wmeng98's suggestion, would it make sense to allow control of these properties through the options provided to openAutocompleteModal
ref properties: https://developers.google.com/places/ios-sdk/reference/interface_g_m_s_autocomplete_view_controller.html#properties
Thoughts @tolu360?

Ive been playing around with a solution and am happy to submit PR if it makes sense, though it would be IOS only options as (to my knowledge) the android side would need a custom layout to apply this kind of control.

Happy to PR if it makes sense to add this feature.

@janva255
Copy link

janva255 commented Dec 2, 2019

I'm having this problem too, with dark mode

@dimaportenko dimaportenko linked a pull request Dec 19, 2019 that will close this issue
@dimaportenko
Copy link

I've created PR with solution from https://stackoverflow.com/a/59071909/923497

zaka5192 added a commit to zaka5192/react-native-google-places that referenced this issue Feb 7, 2020
@anurag91jain
Copy link

Can we please have either #267 or #274 merged?

@aditya-lg
Copy link

@tolu360 please look at merging either #267 or #274, changes helpful for dark-mode on iOS 13+

@MarcoSpeziali
Copy link

What is the status of this issue? Has the PR been merged? Because I'm having the same issue even with the latest version

@dimaportenko
Copy link

@MarcoSpeziali looks like it's stuck. But you can use https://www.npmjs.com/package/patch-package, a great tool for patching your node_modules dependencies. Here is a video with a usage example.

@ArturoTorresMartinez
Copy link

Any updates here?

@ckOfor
Copy link

ckOfor commented Mar 22, 2021

I've created PR with solution from https://stackoverflow.com/a/59071909/923497

Based on this answer, steps to fix

  1. Open XCode
  2. Find the file RNGooglePlacesViewController
  3. Add this to line 38 directly below GMSAutocompleteViewController *viewController = [[GMSAutocompleteViewController alloc] init];
    It should look like
    Uploading Screenshot 2021-03-23 at 00.29.46.png…
        if(UIScreen.mainScreen.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark ){
            viewController.primaryTextColor = UIColor.whiteColor;
            viewController.secondaryTextColor = UIColor.lightGrayColor;
            viewController.tableCellSeparatorColor = UIColor.lightGrayColor;
            viewController.tableCellBackgroundColor = UIColor.darkGrayColor;
        } else {
            viewController.primaryTextColor = UIColor.blackColor;
            viewController.secondaryTextColor = UIColor.lightGrayColor;
            viewController.tableCellSeparatorColor = UIColor.lightGrayColor;
            viewController.tableCellBackgroundColor = UIColor.whiteColor;
        }
    }```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants