fix(frame-ios): tearDownUI when UINavigationController disappear (#6892)

This commit is contained in:
Alexander Djenkov
2019-02-13 15:11:04 +02:00
committed by GitHub
parent 8330ac0ac1
commit 57f07a3ec7
2 changed files with 8 additions and 4 deletions

View File

@ -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());

View File

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