File tree 2 files changed +12
-8
lines changed
2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,11 @@ export class ImagePicker extends data_observable.Observable {
24
24
25
25
// lazy-load latest frame.topmost() if _hostName is not used
26
26
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 ;
28
32
}
29
33
30
34
constructor ( options : Options = { } , hostView : View ) {
@@ -68,7 +72,7 @@ export class ImagePicker extends data_observable.Observable {
68
72
this . _imagePickerControllerDelegate . _resolve = resolve ;
69
73
this . _imagePickerControllerDelegate . _reject = reject ;
70
74
71
- ( < any > this . hostView ) . viewController . presentViewControllerAnimatedCompletion ( this . _imagePickerController , true , null ) ;
75
+ this . hostController . presentViewControllerAnimatedCompletion ( this . _imagePickerController , true , null ) ;
72
76
} ) ;
73
77
}
74
78
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " nativescript-imagepicker" ,
3
- "version" : " 6.0.3 " ,
3
+ "version" : " 6.0.4 " ,
4
4
"description" : " A plugin for the NativeScript framework implementing multiple image picker" ,
5
5
"repository" : {
6
6
"type" : " git" ,
10
10
"typings" : " index.d.ts" ,
11
11
"nativescript" : {
12
12
"platforms" : {
13
- "android" : " 3 .0.0" ,
14
- "ios" : " 3 .0.0"
13
+ "android" : " 4 .0.0" ,
14
+ "ios" : " 4 .0.0"
15
15
}
16
16
},
17
17
"scripts" : {
46
46
"homepage" : " https://git.1-hub.cnNativeScript/nativescript-imagepicker" ,
47
47
"readmeFilename" : " README.md" ,
48
48
"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" ,
52
52
"tslint" : " ~5.4.3"
53
53
},
54
54
"dependencies" : {
You can’t perform that action at this time.
0 commit comments