Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions nativescript-core/ui/page/page.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ class UIViewControllerImpl extends UIViewController {
// Pages in backstack are unloaded so raise loaded here.
if (!owner.isLoaded) {
owner.callLoaded();
} else {
// Note: Handle the case of canceled backstack navigation. (https://github.com/NativeScript/NativeScript/issues/7430)
// In this case viewWillAppear will be executed for the previous page and it will change the ActionBar
// because changes happen in an interactive transition - IOS will animate between the the states.
// If canceled - viewWillAppear will be called for the current page(which is already loaded) and we need to
// update the action bar explicitly, so that it is not left styles as the previous page.
owner.actionBar.update();
}
}

Expand Down Expand Up @@ -192,7 +199,7 @@ class UIViewControllerImpl extends UIViewController {
if (!owner) {
return;
}

// Cache presentedViewController if any. We don't want to raise
// navigation events in case of presenting view controller.
if (!owner._presentedViewController) {
Expand Down Expand Up @@ -223,7 +230,7 @@ class UIViewControllerImpl extends UIViewController {
if (!page || page.modal || page._presentedViewController) {
return;
}

// Forward navigation does not remove page from frame so we raise unloaded manually.
if (page.isLoaded) {
page.callUnloaded();
Expand Down