Skip to content

fix(ios): no blurred images in image picker #211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 12, 2018
Merged
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 deletions src/imagepicker.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ export class ImagePicker extends data_observable.Observable {

// lazy-load latest frame.topmost() if _hostName is not used
get hostView() {
return this._hostView || frame.topmost();
return this._hostView;
}

get hostController() {
return this.hostView ? this.hostView.viewController : UIApplication.sharedApplication.keyWindow.rootViewController;
}

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

(<any>this.hostView).viewController.presentViewControllerAnimatedCompletion(this._imagePickerController, true, null);
this.hostController.presentViewControllerAnimatedCompletion(this._imagePickerController, true, null);
});
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-imagepicker",
"version": "6.0.3",
"version": "6.0.4",
"description": "A plugin for the NativeScript framework implementing multiple image picker",
"repository": {
"type": "git",
Expand All @@ -10,8 +10,8 @@
"typings": "index.d.ts",
"nativescript": {
"platforms": {
"android": "3.0.0",
"ios": "3.0.0"
"android": "4.0.0",
"ios": "4.0.0"
}
},
"scripts": {
Expand Down Expand Up @@ -46,9 +46,9 @@
"homepage": "https://github.com/NativeScript/nativescript-imagepicker",
"readmeFilename": "README.md",
"devDependencies": {
"tns-core-modules": "^3.1.0",
"tns-platform-declarations": "^3.1.0",
"typescript": "~2.6.0",
"tns-core-modules": "^4.0.0",
"tns-platform-declarations": "^4.0.0",
"typescript": "~2.7.0",
"tslint": "~5.4.3"
},
"dependencies": {
Expand Down