Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ios/src/ImageCropPicker.mm
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,15 @@ - (void)dismissCropper:(UIViewController *)controller selectionDone:(BOOL)select
break;
case CAMERA:
[controller.presentingViewController.presentingViewController dismissViewControllerAnimated:YES completion:completion];
if(selectionDone) {
[controller.presentingViewController.presentingViewController dismissViewControllerAnimated:YES completion:completion];
} else {
// if user opened camera picker, tried to crop the image,
// and cancelled cropping, he would return app with promise reject
[controller.presentingViewController.presentingViewController dismissViewControllerAnimated:YES completion:[self waitAnimationEnd:^{
self.reject(ERROR_PICKER_CANCEL_KEY, ERROR_PICKER_CANCEL_MSG, nil);
}]];
}
break;
}
}
Expand Down