fix-next(ios-modal): fix empty modal screen when using common layout as root (#5618)

This commit is contained in:
Alexander Djenkov
2018-04-05 09:44:03 +03:00
committed by GitHub
parent 38e6f6688e
commit 31ee774a6b

View File

@ -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;
}