mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +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);
|
super._showNativeModalView(parentWithController, context, closeCallback, fullscreen, stretched);
|
||||||
let controller = this.viewController;
|
let controller = this.viewController;
|
||||||
if (!controller) {
|
if (!controller) {
|
||||||
|
const nativeView = this.ios || this.nativeViewProtected;
|
||||||
controller = ios.UILayoutViewController.initWithOwner(new WeakRef(this));
|
controller = ios.UILayoutViewController.initWithOwner(new WeakRef(this));
|
||||||
|
|
||||||
|
if (nativeView instanceof UIView) {
|
||||||
|
controller.view.addSubview(nativeView);
|
||||||
|
}
|
||||||
|
|
||||||
this.viewController = controller;
|
this.viewController = controller;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user