react-native-google-places icon indicating copy to clipboard operation
react-native-google-places copied to clipboard

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

Open Wmeng98 opened this issue 4 years ago • 10 comments

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 avatar Nov 16 '19 07:11 Wmeng98

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

white_text

AlexBlake avatar Nov 22 '19 09:11 AlexBlake

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.

AlexBlake avatar Nov 22 '19 13:11 AlexBlake

I'm having this problem too, with dark mode

janva255 avatar Dec 02 '19 15:12 janva255

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

dimaportenko avatar Dec 19 '19 16:12 dimaportenko

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

anurag91jain avatar Aug 09 '20 01:08 anurag91jain

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

aditya-lg avatar Aug 12 '20 04:08 aditya-lg

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

MarcoSpeziali avatar Nov 06 '20 09:11 MarcoSpeziali

@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.

dimaportenko avatar Nov 06 '20 10:11 dimaportenko

Any updates here?

ArturoTorresMartinez avatar Jan 10 '21 03:01 ArturoTorresMartinez

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;
        }
    }```

ckOfor avatar Mar 22 '21 23:03 ckOfor