title: How to navigate to a controller in a navigation controller using Typhoon when using storyboards
body: <p>While using Typhoon I came across this issue, but first some background.</p>
  
  <ul>
  <li>I'm using a storyboard.</li>
  <li>The storyboard starts in a home screen, then flows to login, then to the main screen (UITabBarController). I use navigation controller as root controller.</li>
  <li>If the user is already logged in I want to show the main screen without showing the home or login screens. This could be done in the home screen <code>viewDidLoad</code> (other suggestions welcome).</li>
  </ul>
  
  <p>The few things i've tried are:</p>
  
  <ol>
  <li><p>Using a segue from the home to the tabController but the home screen can be seen and the transition is animated (don't want this).</p></li>
  <li><p>Instantiating the tab controller (as below) from the storyboard but the dependencies are not injected. I understand that this is because the Typhoon storyboard is not used.</p>
  
  <p>UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
  UIViewController *vc1 = [storyboard instantiateViewControllerWithIdentifier:@"MyAuth"];</p></li>
  <li><p>I also tried using factory with Typhoon for the storyboard. </p>
  
  <pre><code>public dynamic func storyboard() -&gt; AnyObject {
  
      return TyphoonDefinition.withClass(TyphoonStoryboard.self){
          (definition) in
  
          definition.useInitializer("storyboardWithName:factory:bundle:"){
              (initializer) in                
  
              initializer.injectParameterWith("Main")
              initializer.injectParameterWith(self)
              initializer.injectParameterWith( NSBundle.mainBundle() )
  
          }
          definition.scope = TyphoonScope.Singleton; //Let's make this a singleton
  
      }    
  }
  
  ///Injection for tabbar controller
  public dynamic func tabBarViewController() -&gt; AnyObject {
  
      return TyphoonDefinition.withClass(TabBarViewController.self){
      (definition) in
  
      }
  
  }
  </code></pre></li>
  </ol>
  
  <p>On the <code>viewDidLoad</code> I push the tabBarViewController (using the injected assembly) to the navigation controller but it doesn't have the tabs as specified on the storyboard.</p>
  
  <pre><code>func viewDidLoad() {
      super.viewDidLoad()
  
      if(userLoggedIn){
          self.navigationController?.pushViewController(self.injectedAssembly.storyboard().tabBarController(), animated: false)
      }
  }
  </code></pre>
  
  <p>Thanks,</p>