Skip to content

Commit 9b8cf51

Browse files
committed
fix(ios): no blurred images in image picker
fix for displaying blurred images in image picker when the root view of the app is any layout nesting TabView related to #195
1 parent 9bdd06c commit 9b8cf51

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/imagepicker.ios.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ export class ImagePicker extends data_observable.Observable {
2424

2525
// lazy-load latest frame.topmost() if _hostName is not used
2626
get hostView() {
27-
return this._hostView || frame.topmost();
27+
return this._hostView;
28+
}
29+
30+
get hostController() {
31+
return this.hostView ? this.hostView.viewController : UIApplication.sharedApplication.keyWindow.rootViewController;
2832
}
2933

3034
constructor(options: Options = {}, hostView: View) {
@@ -68,7 +72,7 @@ export class ImagePicker extends data_observable.Observable {
6872
this._imagePickerControllerDelegate._resolve = resolve;
6973
this._imagePickerControllerDelegate._reject = reject;
7074

71-
(<any>this.hostView).viewController.presentViewControllerAnimatedCompletion(this._imagePickerController, true, null);
75+
this.hostController.presentViewControllerAnimatedCompletion(this._imagePickerController, true, null);
7276
});
7377
}
7478
}

0 commit comments

Comments
 (0)