From 9b8cf517662f8a6b0a6bf3509c94b7341bb1c437 Mon Sep 17 00:00:00 2001 From: pawlak Date: Fri, 7 Sep 2018 16:55:57 +0200 Subject: [PATCH 1/2] 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 --- src/imagepicker.ios.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/imagepicker.ios.ts b/src/imagepicker.ios.ts index e6393fc..15ae887 100644 --- a/src/imagepicker.ios.ts +++ b/src/imagepicker.ios.ts @@ -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) { @@ -68,7 +72,7 @@ export class ImagePicker extends data_observable.Observable { this._imagePickerControllerDelegate._resolve = resolve; this._imagePickerControllerDelegate._reject = reject; - (this.hostView).viewController.presentViewControllerAnimatedCompletion(this._imagePickerController, true, null); + this.hostController.presentViewControllerAnimatedCompletion(this._imagePickerController, true, null); }); } } From e5bb4cacb75b4ab0199ca1b48c8760e7f4361c85 Mon Sep 17 00:00:00 2001 From: pawlak Date: Wed, 12 Sep 2018 11:39:33 +0200 Subject: [PATCH 2/2] update: update tns versions Updated tns dependencies versions to 4.0.0 --- src/package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/package.json b/src/package.json index 1d373ee..b599e74 100644 --- a/src/package.json +++ b/src/package.json @@ -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", @@ -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": { @@ -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": {