fix(ios-frame): tearDownUI and reset UINavigationController (#6817)

This commit is contained in:
Alexander Djenkov
2019-02-06 22:11:13 +02:00
committed by Svetoslav
parent 97d878c107
commit cea97c6b45

View File

@ -23,8 +23,7 @@ let navDepth = -1;
export class Frame extends FrameBase {
public viewController: UINavigationControllerImpl;
public _animatedDelegate = <UINavigationControllerDelegate>UINavigationControllerAnimatedDelegate.new();
private _ios: iOSFrame;
public _ios: iOSFrame;
constructor() {
super();
@ -390,6 +389,9 @@ class UINavigationControllerImpl extends UINavigationController {
const owner = this._owner.get();
if (owner && owner.isLoaded && !owner.parent && !this.presentedViewController) {
owner.callUnloaded();
owner.viewController = null;
owner.ios.controller = null;
}
}
@ -596,6 +598,9 @@ class iOSFrame implements iOSFrameDefinition {
public get controller() {
return this._controller;
}
public set controller(value: UINavigationControllerImpl) {
this._controller = value;
}
public get showNavigationBar(): boolean {
return this._showNavigationBar;