title: UITabBarItem badge value is null
body: <p>In my app I'm using a service that give me a value to put into the <code>UITabBarItem</code> badge.
  Sometimes it happens the follow issue:</p>
  
  <p><img src="https://i.stack.imgur.com/5cPNJ.png" alt="enter image description here"></p>
  
  <p>I think it can be the delay for getting the badge value from the server, so I put the following code to keep it equals to the icon badge:</p>
  
  <pre><code>UITabBar *tabBar = self.tabBarController.tabBar;
  UITabBarItem *tabBarItem2 = [tabBar.items objectAtIndex:1];
  if ([UIApplication sharedApplication].applicationIconBadgeNumber == 0) {
      [tabBarItem2 setBadgeValue:nil];
  } else {
      [tabBarItem2 setBadgeValue:[NSString stringWithFormat:@"%ld", (long)[UIApplication sharedApplication].applicationIconBadgeNumber]];
  }
  </code></pre>
  
  <p>With this code the value of the badge on <code>UITabBarItem</code> should be the same of the badge icon of the app. I put this code in the method <code>- (void)viewWillAppear:(BOOL)animated</code>, because I thought that this method is execute before other method. But when I try the app and I switch fast between the 3 view controller (home, notification and settings), sometimes it shows me null on the notification <code>UITabBarItem</code>. There's a way to don't show me the "null" value on the <code>UITabBarItem</code>?
  Thank you</p>