react-native-image-crop-picker icon indicating copy to clipboard operation
react-native-image-crop-picker copied to clipboard

feat: Minor tweak to the default modal style (to be a non full-screen modal)

Open onelittlebird opened this issue 2 years ago • 0 comments

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

I updated the default modal presentation style to be of type UIModalPresentationAutomatic instead, as it then allows for partial sheet modals (that can be dragged to close) if applicable to the iOS version.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-image-crop-picker/ios/src/ImageCropPicker.m b/node_modules/react-native-image-crop-picker/ios/src/ImageCropPicker.m
index 9f20973..828058a 100644
--- a/node_modules/react-native-image-crop-picker/ios/src/ImageCropPicker.m
+++ b/node_modules/react-native-image-crop-picker/ios/src/ImageCropPicker.m
@@ -357,7 +357,7 @@ - (BOOL)cleanTmpDirectory {
                 }
             }
             
-            [imagePickerController setModalPresentationStyle: UIModalPresentationFullScreen];
+            [imagePickerController setModalPresentationStyle: UIModalPresentationAutomatic];
             [[self getRootVC] presentViewController:imagePickerController animated:YES completion:nil];
         });
     }];

This issue body was partially generated by patch-package.

onelittlebird avatar Oct 02 '23 13:10 onelittlebird