What to do about “Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.”

前端 未结 4 514
刺人心
刺人心 2021-01-18 10:40

I\'m writing an iPhone app using Appcelerator Titanium Mobile. I am hiding and showing the tab group based on what window has focus.

dashWin.addEventListen         


        
相关标签:
4条回答
  • 2021-01-18 11:11

    I had segues that were leading back to my main navigation controller which was causing 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 讨论(0)
  • 2021-01-18 11:20

    I got this error when I linked Action Segue or Selection Segue from one view to another view through storyboard and performed the same segue programmatically again, which makes the navigation controller perform the same segue twice.

    2 solutions for this case:

    1. Removing the code that pushes the view. Just let storyboard perform the segue for you. This is good for most situations.
    2. Replacing Action Segue or Selection Segue with Manual Section and do - (void)performSegueWithIdentifier:(NSString *)identifier sender:(id)sender by yourself. You may find this solution useful when you want to customize the behavior of segue according to the sender.
    0 讨论(0)
  • 2021-01-18 11:22

    Recently, I've faced the same problem. The reason was: -I was trying to pop view controller twice by mistake. you can check this crash by setting breakpoints on push and pop View controllers

    0 讨论(0)
  • 2021-01-18 11:26

    Usually a tab group acts as the root of your app's navigation. When a user taps a tab, that tab's window is focused.

    Next, when a user triggers an action that requires a new window appear, it usually appears either modally or on top (in the navigation stack sense) of the current window. In the latter case, tell the current tab to open the new window.

    If you set the tabBarHidden property to false (when you create the new window), the tab bar will be hidden for you when the new window is opened by the current tab.

    Will this more standard approach work for you?

    0 讨论(0)
提交回复
热议问题