title: ios: How open Tab Bar controller from ViewController using StoryBoards
body: <p>I am doing this and want to open Tab bar Controller from Login Page if its first time and if already login then pass the LoginPage and open Tab Bar Controller after Spalsh</p>
  
  <p>means if user lands in app fiirst time sequesnce should be like this
  1. Splash
  2. Login Page
  3. On successful Login open Tab Bar Controller having 4 tabs</p>
  
  <p>if user already login then
  1. Splash
  2. Tab bar controller</p>
  
  <p><img src="https://i.stack.imgur.com/qyfo4.png" alt="enter image description here"> </p>
  
  <p>I am trying to open Tab Bar controller through the following code in ViewDidLoad method</p>
  
  <pre><code>UITabBarController *tbc = [self.storyboard instantiateViewControllerWithIdentifier:@"TripMapViewer"];
      tbc.selectedIndex=0;
     [self presentViewController:tbc animated:YES completion:nil];
  </code></pre>
  
  <p>but it gives error</p>
  
  <p><strong>2014-02-06 19:55:43.849 ProjNew[1065:907] -[TripMapViewer setSelectedIndex:]: unrecognized selector sent to instance 0x1d5600b0</strong></p>
  
  <p>and if I remove <strong>tbc.selectedIndex=0;</strong> it does nothing and stays on Splash screen like this</p>
  
  <pre><code>UITabBarController *lbc = [self.storyboard instantiateViewControllerWithIdentifier:@"TripMapViewer"];
     [self presentViewController:lbc animated:YES completion:nil]; 
  </code></pre>
  
  <p>please suggest that how do I open tab bar from View Controller</p>