We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8268275 + 61bb9e6 commit 86d56c2Copy full SHA for 86d56c2
src/camera.ios.ts
@@ -165,6 +165,16 @@ export let takePicture = function (options): Promise<any> {
165
if (topMostFrame) {
166
let viewController: UIViewController = topMostFrame.currentPage && topMostFrame.currentPage.ios;
167
if (viewController) {
168
+ while (viewController.parentViewController) {
169
+ // find top-most view controler
170
+ viewController = viewController.parentViewController;
171
+ }
172
+
173
+ while (viewController.presentedViewController) {
174
+ // find last presented modal
175
+ viewController = viewController.presentedViewController;
176
177
178
viewController.presentViewControllerAnimatedCompletion(imagePickerController, true, null);
179
}
180
0 commit comments