React-native-image-crop-picker: iOS 13 dark mode support.

Created on 10 Sep 2019  ·  11Comments  ·  Source: ivpusic/react-native-image-crop-picker

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.25.0
  • react-native v0.60.5

Platform

Tell us to which platform this issue is related

  • iOS

Expected behaviour

Image picker should looks properly in dark mode.
( background color, text color )

Actual behaviour

Picker background partly white. The albums titles are not readable.

Steps to reproduce

  1. get iPhone XR

  2. call openPicker

  3. Look at picker styles.

Attachments

image

Most helpful comment

Solution from @jrapala works (for those stuck on a react-native < 0.60 project)! Found another workaround for anyone in this situation who wants to avoid patching node_modules:

  • Clone react-native-image-crop-picker > v0.25.3
  • In your project's ios directory, create a directory called patch
  • Copy the contents of react-native-image-crop-picker/ios/QBImagePicker from the cloned repo and drop it into your new patch directory
  • Add the following to your Podfile: pod 'QBImagePickerController', :path => './patch/QBImagePicker/QBImagePickerController.podspec'
  • $ cd ios && pod install

All 11 comments

+1

I made a fork to add the dark mode support #1129

+1

If anyone is still stuck on a react-native < 0.60 project like me, this fix seems to work on < 0.25.0 versions as well.

Thanks @cr1s3c!

Thanks, adding a dependency
pod 'QBImagePickerController', :path => '../node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePickerController.podspec',
running pod install and Product > Clean Build Folder solves that issue with iOS 13 dark mode for my app.

Снимок экрана 2019-10-18 в 16 17 28

If anyone is still stuck on a react-native < 0.60 project like me, this fix seems to work on < 0.25.0 versions as well.

Thanks @cr1s3c!

@jrapala -- did you have to edit node_modules directly?

@Rileyp33 Yep, I'm a fan of patch-package for making adjustments like this.

patch-package

Thank you!

Solution from @jrapala works (for those stuck on a react-native < 0.60 project)! Found another workaround for anyone in this situation who wants to avoid patching node_modules:

  • Clone react-native-image-crop-picker > v0.25.3
  • In your project's ios directory, create a directory called patch
  • Copy the contents of react-native-image-crop-picker/ios/QBImagePicker from the cloned repo and drop it into your new patch directory
  • Add the following to your Podfile: pod 'QBImagePickerController', :path => './patch/QBImagePicker/QBImagePickerController.podspec'
  • $ cd ios && pod install

If anyone is still stuck on a react-native < 0.60 project like me, this fix seems to work on < 0.25.0 versions as well.

Thanks @cr1s3c!

Thanks, adding a dependency
pod 'QBImagePickerController', :path => '../node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePickerController.podspec',
running pod install and Product > Clean Build Folder solves that issue with iOS 13 dark mode for my app.

Снимок экрана 2019-10-18 в 16 17 28

Thanks, adding a dependency
pod 'QBImagePickerController', :path => '../node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePickerController.podspec',
running pod install and Product > Clean Build Folder solves that issue with iOS 13 dark mode for my app.

Снимок экрана 2019-10-18 в 16 17 28

thank you save my hair XDDDDD

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhangjunhou picture zhangjunhou  ·  3Comments

leelandclay picture leelandclay  ·  3Comments

fmcruz picture fmcruz  ·  3Comments

pavsidhu picture pavsidhu  ·  3Comments

habovh picture habovh  ·  3Comments