FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(dialogs): Setting the size of popup dialog thru dialog options by slolam · Pull Request #8041 · NativeScript/NativeScript · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .md  (1) .ts  (2) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
10 changes: 6 additions & 4 deletions api-reports/NativeScript.api.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1884,7 +1884,9 @@ export interface ShowModalOptions {
fullscreen?: boolean;

ios?: {
presentationStyle: any /* UIModalPresentationStyle */
presentationStyle?: any; /* UIModalPresentationStyle */
width?: number;
height?: number;
}

stretched?: boolean;
Expand Down Expand Up @@ -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)

Expand Down
10 changes: 9 additions & 1 deletion nativescript-core/ui/core/view-base/view-base.d.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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?: {
/**
Expand Down
5 changes: 5 additions & 0 deletions nativescript-core/ui/core/view/view.ios.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

Back | FazBrowse Home | New Git URL