Skip to content

Commit 31ee774

Browse files
authored
fix-next(ios-modal): fix empty modal screen when using common layout as root (#5618)
1 parent 38e6f66 commit 31ee774

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎tns-core-modules/ui/core/view/view.ios.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,13 @@ export class View extends ViewCommon {
317317
super._showNativeModalView(parentWithController, context, closeCallback, fullscreen, stretched);
318318
let controller = this.viewController;
319319
if (!controller) {
320+
const nativeView = this.ios || this.nativeViewProtected;
320321
controller = ios.UILayoutViewController.initWithOwner(new WeakRef(this));
322+
323+
if (nativeView instanceof UIView) {
324+
controller.view.addSubview(nativeView);
325+
}
326+
321327
this.viewController = controller;
322328
}
323329

@@ -733,7 +739,7 @@ export namespace ios {
733739
public viewWillAppear(animated: boolean): void {
734740
super.viewWillAppear(animated);
735741
const owner = this.owner.get();
736-
if(!owner){
742+
if (!owner) {
737743
return;
738744
}
739745

0 commit comments

Comments
 (0)