mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
fix-next(ios-modal): fix empty modal screen when using common layout as root (#5618)
This commit is contained in:

committed by
GitHub

parent
38e6f6688e
commit
31ee774a6b
@ -317,7 +317,13 @@ export class View extends ViewCommon {
|
||||
super._showNativeModalView(parentWithController, context, closeCallback, fullscreen, stretched);
|
||||
let controller = this.viewController;
|
||||
if (!controller) {
|
||||
const nativeView = this.ios || this.nativeViewProtected;
|
||||
controller = ios.UILayoutViewController.initWithOwner(new WeakRef(this));
|
||||
|
||||
if (nativeView instanceof UIView) {
|
||||
controller.view.addSubview(nativeView);
|
||||
}
|
||||
|
||||
this.viewController = controller;
|
||||
}
|
||||
|
||||
@ -733,7 +739,7 @@ export namespace ios {
|
||||
public viewWillAppear(animated: boolean): void {
|
||||
super.viewWillAppear(animated);
|
||||
const owner = this.owner.get();
|
||||
if(!owner){
|
||||
if (!owner) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user