mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(ios-frame): tearDownUI and reset UINavigationController
This commit is contained in:
@@ -33,6 +33,12 @@ export class Frame extends FrameBase {
|
|||||||
this.nativeViewProtected = this._ios.controller.view;
|
this.nativeViewProtected = this._ios.controller.view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public disposeNativeView() {
|
||||||
|
this._ios.controller = null;
|
||||||
|
this.viewController = null;
|
||||||
|
super.disposeNativeView();
|
||||||
|
}
|
||||||
|
|
||||||
public get ios(): iOSFrame {
|
public get ios(): iOSFrame {
|
||||||
return this._ios;
|
return this._ios;
|
||||||
}
|
}
|
||||||
@@ -373,6 +379,7 @@ class UINavigationControllerImpl extends UINavigationController {
|
|||||||
const owner = this._owner.get();
|
const owner = this._owner.get();
|
||||||
if (owner && owner.isLoaded && !owner.parent && !this.presentedViewController) {
|
if (owner && owner.isLoaded && !owner.parent && !this.presentedViewController) {
|
||||||
owner.callUnloaded();
|
owner.callUnloaded();
|
||||||
|
owner._tearDownUI(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -580,6 +587,10 @@ class iOSFrame implements iOSFrameDefinition {
|
|||||||
return this._controller;
|
return this._controller;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public set controller(value: UINavigationControllerImpl) {
|
||||||
|
this._controller = value;
|
||||||
|
}
|
||||||
|
|
||||||
public get showNavigationBar(): boolean {
|
public get showNavigationBar(): boolean {
|
||||||
return this._showNavigationBar;
|
return this._showNavigationBar;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user