diff --git a/api-reports/NativeScript.api.md b/api-reports/NativeScript.api.md index c047e2f30..d2d7d9360 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) 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 81723081f..0537ac47e 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?: { /** diff --git a/nativescript-core/ui/core/view/view.ios.ts b/nativescript-core/ui/core/view/view.ios.ts index 822b160b7..d02aa6447 100644 --- a/nativescript-core/ui/core/view/view.ios.ts +++ b/nativescript-core/ui/core/view/view.ios.ts @@ -432,6 +432,11 @@ export class View extends ViewCommon implements ViewDefinition { 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) {