title: UITabBar with UINavigationController in code
body: <p>I've currently got a UITabBar with 5 screens calling UIViews. That part works fine but I want to put in a UINavigationController in a couple of them. I have found a few tutorials that work fine but all of them implement it in IB and I want to avoid that if possible. </p>
  
  <p>I'm lost as to where to implement the UINavigationController, should I do it in the App Delegate with the UITabBar and call the navigation controller from the UIView or should I create it in the UIView class?</p>
  
  <p>I've tried about 8 different ways and always ends up with either the Navbar not working, no nav bar at all or the app crashing.</p>
  
  <p>Currently I create the tab bar like this:</p>
  
  <pre><code>tabBarController = [[UITabBarController alloc] init];
  ScreenA *screenA = [[ScreenA alloc] initWithNibName:@"ScreenA" bundle:nil];
  //more here
  tabBarController.viewControllers = [NSArray arrayWithObjects:screenA, ...., nil];
  [window addSubview:tabBarController.view];
  </code></pre>
  
  <p>And in the initWithNibName I have this: </p>
  
  <pre><code>self.title = @"Screen A";
  self.tabBarItem.image = [UIImage imageNamed:@"someImage.png"];
  </code></pre>