My team is developing an application that has a UITabBarController. We are using Storyboard to develop the interfaces and the flows.
Since we are a team, we cannot put all flow in just one storyboard, because it will cause in problems with syncing with SVN. So, the solution is to put each tab`s flow in one different storyboard file.
The connection between storyboards is not the problem when I can create an object to do the connection (a button, for example) as we can see in this tutorial.
But when I put a UITabBarController in one storyboard, I cannot manage the view element of the bottom bar (the tabBar itself) in a way to programmatically set the storyboard that will be displayed for each button of the tabBar.
For now, I have the TabBar and the UIViewControllers in the same .storyboard file as we can see:
So what I need is to connect different storyboards through one UITabBarController. How to do that?
You can use Storyboard references to keep the sections of your app separate and in individual Storyboard files. With UITabBarController just ctrl-link to the reference and make sure that you add a UITabBarItem to your ViewController in the new Storyboard.
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Yourstoryboard" bundle:nil];
UINavigationController *thisController = [storyboard instantiateViewControllerWithIdentifier:@"YourID"];
mytabBarController.viewControllers = @[phoneViewController];
I still think you should use git : )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With