title: iOS: Tabbar Tint Color
body: <p>I'm creating a TabBar in code:</p>
  
  <pre><code>self = [super init];
  
      self.tabBarController = [[UITabBarController alloc]init];
      self.tabBarController.delegate = self;
      self.tabBarController.navigationController.delegate = self;
  
      //Build Model
      NSArray *topLevelControllers = [self buildTopLevelControllers];
      [self.tabBarController setViewControllers:topLevelControllers animated:NO];
  
      //Inbox will be lead navigation
      self.tabBarController.selectedIndex = kSelectedIndex;
  
      [self.view addSubview:self.tabBarController.view];
      self.tabBarController.customizableViewControllers = @[];
  
  
      return self;
  }
  </code></pre>
  
  <p>In App Delegate I have the following code for Tint:</p>
  
  <pre><code>[[UIView appearance] setTintColor:[ColorUtils globalTintColor]];
  </code></pre>
  
  <p><strong>Problem:</strong>  When the App launches, all the icons in the Tab Bar are tinted with the global color.  When I select one and then unselect it, they go back to Grey (images default color).  </p>
  
  <p><strong>Desired Result:</strong>  When the App launches, all the buttons are Grey (Grey is the image color in the PNGs).  When I tap on the tab bar icon, the color changes to the global tint color.  </p>
  
  <p><strong>Tried:</strong>  In the App delegate, I have added the following code and it does NOT work:</p>
  
  <pre><code>TabBarVC *tabBarVC = [[TabBarVC alloc]init];
  tabBarVC.tabBarController.tabBar.tintColor = [UIColor greyColor];
  tabBarVC.tabBarController.tabBar.selectedImageTintColor = [STColorUtils globalTintColor];
  
  [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName : [ColorUtils globalTintColor]}];
  
  
  [[UIView appearance] setTintColor:[ColorUtils globalTintColor]];
  [self.window setRootViewController:tabBarVC];
  </code></pre>
  
  <p>However, if I comment out: </p>
  
  <pre><code>//[[UIView appearance] setTintColor:[ColorUtils globalTintColor]];
  </code></pre>
  
  <p>The icons do appear Grey, but the global tint color is iOS7 default: Blue.  </p>