mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:33:20 +08:00
fix(frame-ios): tearDownUI when UINavigationController disappear (#6892)
This commit is contained in:

committed by
GitHub

parent
8330ac0ac1
commit
57f07a3ec7
@ -101,8 +101,11 @@ export function test_backAndForwardParentPage_nestedFrames() {
|
||||
helper.waitUntilNavigatedTo(parentPage1, () => frame.goBack());
|
||||
currentPageMustBe("ParentPage1");
|
||||
|
||||
helper.waitUntilNavigatedTo(parentPage2, () => topmost.navigate({ create: () => parentPage2 }));
|
||||
currentPageMustBe("ParentPage2");
|
||||
const innerPage3 = page("InnerPage3");
|
||||
const parentPage3 = parentPage("ParentPage3", innerPage3);
|
||||
|
||||
helper.waitUntilNavigatedTo(parentPage3, () => topmost.navigate({ create: () => parentPage3 }));
|
||||
currentPageMustBe("ParentPage3");
|
||||
|
||||
back(2);
|
||||
TKUnit.waitUntilReady(() => topmostFrame().navigationQueueIsEmpty());
|
||||
|
@ -37,6 +37,8 @@ export class Frame extends FrameBase {
|
||||
|
||||
public disposeNativeView() {
|
||||
this._removeFromFrameStack();
|
||||
this.viewController = null;
|
||||
this._ios.controller = null;
|
||||
super.disposeNativeView();
|
||||
}
|
||||
|
||||
@ -389,9 +391,8 @@ class UINavigationControllerImpl extends UINavigationController {
|
||||
const owner = this._owner.get();
|
||||
if (owner && owner.isLoaded && !owner.parent && !this.presentedViewController) {
|
||||
owner.callUnloaded();
|
||||
owner._tearDownUI(true);
|
||||
|
||||
owner.viewController = null;
|
||||
owner.ios.controller = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user