fix(ios-frame): tearDownUI and reset UINavigationController

This commit is contained in:
ADjenkov
2019-01-23 10:29:24 +02:00
parent 4a37b79634
commit 88f1ab6b74
3 changed files with 15 additions and 4 deletions

View File

@@ -33,6 +33,12 @@ export class Frame extends FrameBase {
this.nativeViewProtected = this._ios.controller.view;
}
public disposeNativeView() {
this._ios.controller = null;
this.viewController = null;
super.disposeNativeView();
}
public get ios(): iOSFrame {
return this._ios;
}
@@ -373,6 +379,7 @@ class UINavigationControllerImpl extends UINavigationController {
const owner = this._owner.get();
if (owner && owner.isLoaded && !owner.parent && !this.presentedViewController) {
owner.callUnloaded();
owner._tearDownUI(true);
}
}
@@ -580,6 +587,10 @@ class iOSFrame implements iOSFrameDefinition {
return this._controller;
}
public set controller(value: UINavigationControllerImpl) {
this._controller = value;
}
public get showNavigationBar(): boolean {
return this._showNavigationBar;
}