What to do with "Finishing the transition to navigation in an unexpected state. The navigation tree in the navigation panel may be damaged."

I am writing an iPhone application using Appcelerator Titanium Mobile. I hide and show a group of tabs based on which window has focus.

dashWin.addEventListener("focus",function(e) { if (dashWin.tabGroupVisible == true) { dashWin.tabGroupVisible=false; tabGroup.animate({bottom:-50,duration:500}); } }); 

The above code hides a group of tabs when dashWin receives a focus event. However, I see this message in the Titanium console when an event is fired while running in the iPhone simulator:

Completing the navigation transition in an unexpected state. The navigation tree's visibility tree may be damaged.

As a result of a Google search, there is one result: https://stackoverflow.com/a/166268/ which can have a hint about what is happening.

+7
source share
4 answers

Typically, a group of tabs acts as the root of the navigation in your application. When a user deletes a tab, this tab window is focused.

Further, when the user launches an action requiring the appearance of a new window, it usually appears either as a modality or on top (in the sense of the navigation stack) of the current window. In the latter case, say the current tab to open a new window.

If the tabBarHidden property is set to false (when creating a new window), the tab bar will be hidden for you when a new window opens with the current tab.

Will this more standard approach work for you?

+2
source

I got this error when I linked an Action Segue or Selection Segue to one view of another view through a storyboard and again did the same programmatically, which causes the navigation controller to perform the same session twice.

2 solutions for this case:

  • Removing code that pushes the view. Just let the storyboard do the shogu for you. This is good for most situations.
  • Replace the Action Segue or Selection Segue with the Manual Section and do - (void)performSegueWithIdentifier:(NSString *)identifier sender:(id)sender yourself. You may find this solution useful when you want to customize the segue behavior according to the sender.
+3
source

I had segues that returned to my main navigation controller, which triggered this. I fixed the problem by setting the main navigation controller back to the top of the stack. Here is the code:

 - (void) viewDidAppear:(BOOL)animated { [self.navigationController popToRootViewControllerAnimated:NO]; } 
0
source

I recently ran into the same problem. The reason is that: -I tried to erroneously disgrace the controller. you can verify this failure by setting breakpoints on the push and pop View controllers

0
source

All Articles