title: How to add UITabBarController programmatically (no xib file or storyboard)
body: <p>I want to add a <code>UITabBarController</code> to my application. But I have to do it with code only. No xib files or storyboards. How to do this entirely through code?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <pre><code>_tbc = [[UITabBarController alloc] init];
  aboutUsView = [[AboutUsView alloc] init];
  helpView = [[HelpView alloc] init];
  optionsView = [[OptionsView alloc] init];
  self.navCon = [[UINavigationController alloc] initWithRootViewController:optionsView];
              [self setnavigationCon:self.navCon];
              [optionsView setdataLayer:self];
  if ([navCon.navigationBar respondsToSelector:@selector(setBackgroundImage:forBarMetrics:)] ) {
        UIImage *image = [UIImage imageNamed:@"Navigation Bar_reduced.png"];
        [self.navCon.navigationBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];
        [optionsView addSelfView:window];
  }
  _tbc.viewControllers = [NSArray arrayWithObjects:navCon, aboutUsView, helpView, nil];
  [window addSubview:_tbc.view];
  </code></pre>