title: How to programmatically link UITabBar with Different ViewControllers with NIBs when UITabBar is NOT rootViewController
body: <p>I have a tableViewController that once tapped on a cell it takes you to <code>FirstViewController</code>FirstViewController has a UITabBar with 4 items. I want to programmatically hook each of those buttons/items to viewController that already exist in my project. </p>
  
  <p>I have done a lot of research but haven't arrived at something that address this problem</p>
  
  <p>What I have so far is <code>FirstViewController, SecondViewController, ThirdViewController, FourthViewController</code></p>
  
  <p>in <code>FirstViewController.xib</code> I have the TabBar with 4 icons.</p>
  
  <pre><code>FirstViewController.h
  
  @property (strong, nonatomic) IBOutlet UITabBarController *tabBarController;
  @property (weak, nonatomic) IBOutlet UITabBarItem *tabBar;
  @property (weak, nonatomic) IBOutlet UITabBarItem *firstItem;
  @property (weak, nonatomic) IBOutlet UITabBarItem *secondItem;
  @property (weak, nonatomic) IBOutlet UITabBarItem *thirdItem;
  @property (weak, nonatomic) IBOutlet UITabBarItem *fourthItem;
  
  FirstViewController.m
  
  - (void)viewDidLoad {
      FirstViewController *first = [[FirstViewController alloc] init];
      SecondViewController *second = [[SecondViewController alloc] init];
      ThirdViewController *third = [[ThirdViewController alloc] init];
      FourthViewController *fourth = [[FourthViewController alloc] init];
  
      self.tabBarController.viewControllers = [NSArray arrayWithObject: first, second, third, fourth, nil];
  
  }
  </code></pre>
  
  <p>This code doesn't work when I tab on the fourth button for example it doesn't show the <code>fourthViewController</code> nib </p>