title: UITabBarItem change badge colour in iOS 7.1
body: <p>Hi I am trying to change badge colour of UITabBarItem. Below is the code that I am using to achieve the same. The below code works in iOS 7.0. But it is not working in iOS 7.1. Any Help is appreciated.</p>
  
  <pre><code>for (UIView* tabBarButton in _tabbar.subviews) {
      for (UIView* badgeView in tabBarButton.subviews) {
          NSString* className = NSStringFromClass([badgeView class]);  
          // looking for _UIBadgeView
          if ([className rangeOfString:@"BadgeView"].location != NSNotFound) {
              for (UIView* badgeSubview in badgeView.subviews) {
                  NSString* className = NSStringFromClass([badgeSubview class]);
  
                  // looking for _UIBadgeBackground
                  if ([className rangeOfString:@"BadgeBackground"].location != NSNotFound) {
                      @try {
                          NSLog(@"*******************BADGE IMAGE SET *******************");
                          [badgeSubview setValue:[UIImage imageNamed:@"count_bg.png"] forKey:@"image"];
                          //[badgeSubview setTintColor:[UIColor greenColor]];
                      }
                      @catch (NSException *exception) {}
                  }
  
                  if ([badgeSubview isKindOfClass:[UILabel class]]) {
                      ((UILabel *)badgeSubview).textColor = [UIColor whiteColor];
                  }
              }
          }
      }
  }
  </code></pre>