title: UITabbarController Change Bar Item Title Programmatically
body: <p>I'm trying to change the name of the tab bar item in my app programmatically. </p>
  
  <p>In my <strong>storyboard</strong> I have a UITabBarController set as the initial view and the hierarchy is as follows:</p>
  
  <p><em>UITabBarController -> UINavigationController -> UITableViewController -> Detail View Controller</em></p>
  
  <p>To change the title of the bar item you need to change the bar item's title of the UINavigationController. In IB everything works well, but I need to localize my app, which I do dynamically (without app restart) and every time I start up the app the titles of the ones given in IB is set and the titles won't change to their localized title until I tap the bar item.</p>
  
  <p>In my respective UITableViewControllers I set the title with <code>self.title = localized title;</code> and that works well. <strong><em>But I want to have the app change the bar item titles at start up, and not until I tap them.</em></strong></p>
  
  <p>I've looked at posts here on SO regarding this issue and tried the suggestions, but still the titles of the bar items are always set to their values from IB. I also tried this code below, but that only sets the selected bar item at startup:</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
      // Select the desired tab of our initial tab bar controller:
      UITabBarController *tabBar = (UITabBarController *)self.window.rootViewController;
      tabBar.selectedIndex = 1;
      tabBar.navigationController.title = @"Item 2";
  
      [(UITabBarItem*)[self-&gt;tabBarController.tabBar.items objectAtIndex:1] setTitle:@"Item 2"];
  
      // Override point for customization after application launch.
      return YES;
  
  }
  </code></pre>