0
votes

To get more structure in my project I started to use multiple storyboards.

Now I want to push a ViewController from another Storyboard. This works as aspected with no warnings. Unless I open the ViewController for a second time.

The push produces this error message: "nested push animation can result in corrupted navigation bar" and on pop it results in a crash with this message: "Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted."

I push the ViewController with this code: [self.navigationController pushViewController:controller animated:YES];

I assume there is something wrong with the NavigationController.

1
Some code is useful to help you. You probably have two navigation controller (One in each storyboard), And when you create the first viewController in the second storyboard you are creating another navController too. But I thing more explanation is welcome.Onik IV
What class is controller? Maybe a UINavigationController?Cornelius
I deleted the NavigationController in storyboard 2 to make sure that this is not causing the problem. controller is kind of UIViewController. There is no more code to show you.netshark1000
found my mistake: this was cause by notification center which registered an event on viewwillappear multiple times. But RBStoryboardLinks seems to be pretty useful.netshark1000

1 Answers

1
votes

You should use this : https://github.com/rob-brown/RBStoryboardLink

It enables you to create storyboard links (segues) in your storyboards.

Using this you dont need to use pushViewControllers anymore (which cause your issues). You will be able to use Segues and your life will be much more easier ;)

just in case method for segues :

[self performSegueWithIdentifer:@"MyStoryboard" sender:self];

Enjoy :)