We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ec799c1 + ae01dde commit fb37d3fCopy full SHA for fb37d3f
src/imagepicker.ios.ts
@@ -28,7 +28,15 @@ export class ImagePicker extends data_observable.Observable {
28
}
29
30
get hostController() {
31
- return this.hostView ? this.hostView.viewController : UIApplication.sharedApplication.keyWindow.rootViewController;
+ let vc = this.hostView ? this.hostView.viewController : UIApplication.sharedApplication.keyWindow.rootViewController;
32
+ while (
33
+ vc.presentedViewController
34
+ && vc.presentedViewController.viewLoaded
35
+ && vc.presentedViewController.view.window
36
+ ) {
37
+ vc = vc.presentedViewController;
38
+ }
39
+ return vc;
40
41
42
constructor(options: Options = {}, hostView: View) {
0 commit comments