From 66e3da27f0ef7a4962faeb8aa7cb1fbad8104b78 Mon Sep 17 00:00:00 2001 From: Shailesh Lolam Date: Wed, 30 Oct 2019 19:24:19 -0700 Subject: [PATCH 1/7] Added iOS specific height and width attributes to ShowModalOptions --- nativescript-core/ui/core/view-base/view-base.d.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nativescript-core/ui/core/view-base/view-base.d.ts b/nativescript-core/ui/core/view-base/view-base.d.ts index d0618064eb..9099b47546 100644 --- a/nativescript-core/ui/core/view-base/view-base.d.ts +++ b/nativescript-core/ui/core/view-base/view-base.d.ts @@ -79,7 +79,15 @@ export interface ShowModalOptions { /** * The UIModalPresentationStyle to be used when showing the dialog in iOS . */ - presentationStyle: any /* UIModalPresentationStyle */ + presentationStyle: any; /* UIModalPresentationStyle */ + /** + * width of the popup dialog + */ + width: number; + /** + * height of the popup dialog + */ + height: number; } android?: { /** From 9592aef72c36dc20a98cc71a0fcea62f1cceb3ef Mon Sep 17 00:00:00 2001 From: Shailesh Lolam Date: Wed, 30 Oct 2019 19:27:45 -0700 Subject: [PATCH 2/7] Set the height and width of the popup dialog to the presenting controller --- nativescript-core/ui/core/view/view.ios.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nativescript-core/ui/core/view/view.ios.ts b/nativescript-core/ui/core/view/view.ios.ts index 83c5e4ce25..772ff70c5a 100644 --- a/nativescript-core/ui/core/view/view.ios.ts +++ b/nativescript-core/ui/core/view/view.ios.ts @@ -415,6 +415,11 @@ export class View extends ViewCommon { controller.modalPresentationStyle = UIModalPresentationStyle.FullScreen; } else { controller.modalPresentationStyle = UIModalPresentationStyle.FormSheet; + //check whether both height and width is provided and are positive numbers + // set it has prefered content size to the controller presenting the dialog + if (options.ios && options.ios.width > 0 && options.ios.height > 0) { + controller.preferredContentSize = CGSizeMake(options.ios.width, options.ios.height); + } } if (options.ios && options.ios.presentationStyle) { From 65931e7513393321f98f6f3a3fd2d76e97be9efd Mon Sep 17 00:00:00 2001 From: Shailesh Lolam Date: Wed, 30 Oct 2019 23:29:55 -0700 Subject: [PATCH 3/7] dialog options ios attributes presentationStyle, height & width are made optional --- nativescript-core/ui/core/view-base/view-base.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nativescript-core/ui/core/view-base/view-base.d.ts b/nativescript-core/ui/core/view-base/view-base.d.ts index 9099b47546..5b2b2dd8f6 100644 --- a/nativescript-core/ui/core/view-base/view-base.d.ts +++ b/nativescript-core/ui/core/view-base/view-base.d.ts @@ -79,15 +79,15 @@ export interface ShowModalOptions { /** * The UIModalPresentationStyle to be used when showing the dialog in iOS . */ - presentationStyle: any; /* UIModalPresentationStyle */ + presentationStyle?: any; /* UIModalPresentationStyle */ /** * width of the popup dialog */ - width: number; + width?: number; /** * height of the popup dialog */ - height: number; + height?: number; } android?: { /** From 7a94daafa91771f7bdf5777da462098312e6be88 Mon Sep 17 00:00:00 2001 From: Shailesh Lolam Date: Tue, 3 Dec 2019 10:09:13 -0700 Subject: [PATCH 4/7] Updated NativeScript.api.md for public API changes --- api-reports/NativeScript.api.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/api-reports/NativeScript.api.md b/api-reports/NativeScript.api.md index c047e2f30b..d2d7d93604 100644 --- a/api-reports/NativeScript.api.md +++ b/api-reports/NativeScript.api.md @@ -1884,7 +1884,9 @@ export interface ShowModalOptions { fullscreen?: boolean; ios?: { - presentationStyle: any /* UIModalPresentationStyle */ + presentationStyle?: any; /* UIModalPresentationStyle */ + width?: number; + height?: number; } stretched?: boolean; @@ -3065,9 +3067,9 @@ export class XmlParser { // nativescript-core/index.d.ts:117:5 - (ae-forgotten-export) The symbol "layout" needs to be exported by the entry point index.d.ts // nativescript-core/index.d.ts:118:5 - (ae-forgotten-export) The symbol "ad" needs to be exported by the entry point index.d.ts // nativescript-core/index.d.ts:119:5 - (ae-forgotten-export) The symbol "ios" needs to be exported by the entry point index.d.ts -// nativescript-core/ui/core/view-base/view-base.d.ts:171:26 - (ae-forgotten-export) The symbol "Property" needs to be exported by the entry point index.d.ts -// nativescript-core/ui/core/view-base/view-base.d.ts:171:26 - (ae-forgotten-export) The symbol "CssProperty" needs to be exported by the entry point index.d.ts -// nativescript-core/ui/core/view-base/view-base.d.ts:171:26 - (ae-forgotten-export) The symbol "CssAnimationProperty" needs to be exported by the entry point index.d.ts +// nativescript-core/ui/core/view-base/view-base.d.ts:179:26 - (ae-forgotten-export) The symbol "Property" needs to be exported by the entry point index.d.ts +// nativescript-core/ui/core/view-base/view-base.d.ts:179:26 - (ae-forgotten-export) The symbol "CssProperty" needs to be exported by the entry point index.d.ts +// nativescript-core/ui/core/view-base/view-base.d.ts:179:26 - (ae-forgotten-export) The symbol "CssAnimationProperty" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) From be2418e5059a3f4b0084c3a2a43101066a79ed26 Mon Sep 17 00:00:00 2001 From: Shailesh Lolam Date: Tue, 3 Dec 2019 10:27:51 -0700 Subject: [PATCH 5/7] Update with git properties --- api-reports/NativeScript.api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-reports/NativeScript.api.md b/api-reports/NativeScript.api.md index d2d7d93604..9503064b43 100644 --- a/api-reports/NativeScript.api.md +++ b/api-reports/NativeScript.api.md @@ -3073,4 +3073,4 @@ export class XmlParser { // (No @packageDocumentation comment for this package) -``` +``` \ No newline at end of file From f4037cc97e194012da493c133771e707fd3aab1f Mon Sep 17 00:00:00 2001 From: Shailesh Lolam Date: Tue, 3 Dec 2019 10:35:14 -0700 Subject: [PATCH 6/7] Public API --- api-reports/NativeScript.api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-reports/NativeScript.api.md b/api-reports/NativeScript.api.md index 9503064b43..d2d7d93604 100644 --- a/api-reports/NativeScript.api.md +++ b/api-reports/NativeScript.api.md @@ -3073,4 +3073,4 @@ export class XmlParser { // (No @packageDocumentation comment for this package) -``` \ No newline at end of file +``` From 748fb97a4cd8346dac153cf565a5a9315015560e Mon Sep 17 00:00:00 2001 From: Shailesh Lolam Date: Wed, 4 Dec 2019 09:12:18 -0700 Subject: [PATCH 7/7] CLA update