Hallo I have this code into my appDelegate:
- (void)applicationDidBecomeActive:(UIApplication *)application {
UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UITabBarController *myTabBarController = [storyboard instantiateViewControllerWithIdentifier:@"tabBarController"];
if ([unread isEqualToString:@"0"]) {
for (UIViewController *vc in myTabBarController.viewControllers) {
if (vc.tabBarItem.tag == 999) {
vc.tabBarItem.badgeValue =@"5";// nil;
}
}
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;
}
If I test with the Debug, the code is executed in perfect way, but on the interface, the badge isn't updated.... Why?
Thanks...