Skip to content

Commit bd261cd

Browse files
author
Zdravko
authored
Merge pull request #211 from JakubPawlak/master
fix(ios): no blurred images in image picker
2 parents 358c630 + e5bb4ca commit bd261cd

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/imagepicker.ios.ts

+6-2
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
}

src/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-imagepicker",
3-
"version": "6.0.3",
3+
"version": "6.0.4",
44
"description": "A plugin for the NativeScript framework implementing multiple image picker",
55
"repository": {
66
"type": "git",
@@ -10,8 +10,8 @@
1010
"typings": "index.d.ts",
1111
"nativescript": {
1212
"platforms": {
13-
"android": "3.0.0",
14-
"ios": "3.0.0"
13+
"android": "4.0.0",
14+
"ios": "4.0.0"
1515
}
1616
},
1717
"scripts": {
@@ -46,9 +46,9 @@
4646
"homepage": "https://git.1-hub.cnNativeScript/nativescript-imagepicker",
4747
"readmeFilename": "README.md",
4848
"devDependencies": {
49-
"tns-core-modules": "^3.1.0",
50-
"tns-platform-declarations": "^3.1.0",
51-
"typescript": "~2.6.0",
49+
"tns-core-modules": "^4.0.0",
50+
"tns-platform-declarations": "^4.0.0",
51+
"typescript": "~2.7.0",
5252
"tslint": "~5.4.3"
5353
},
5454
"dependencies": {

0 commit comments

Comments
 (0)