bthurlow / nativescript-imagecropper

A nativescript image cropping plugin.
Other
49 stars 35 forks source link

Not working when used with camera plugin #57

Open JWiseCoder opened 5 years ago

JWiseCoder commented 5 years ago

Plugin version: 1.0.7 NativeScript Version: 6.0.2 OS: iOS

When using the cropping tool with the camera plugin (such as in the example given in the documentation of this plugin), the crop view controller will not appear. The promise neither is resolved nor rejected. Nothing happens.

However, if you put a setTimeout around the imageCropper.show call, the imageCropper will appear after the interval. I think this is due to the fact that the ImageCropper is trying to present the view controller before or at the same time as the camera viewcontroller is on the screen or animating out.

This did not seem to be the case in earlier version. It seemed to work fine there.

I suspect this may have something to do with the weird while loop that runs until there is no presented viewcontroller. This is really not a good way of accomplishing that. And I suspect it might be part of the problem.

shiv19 commented 4 years ago

https://github.com/bthurlow/nativescript-imagecropper/issues/49#issuecomment-570948851