iOS--badgeValue(角标)

//通知传值

【iOS--badgeValue(角标)】NSString *badgeNum =[NSString stringWithFormat:@"%@",[getMsgNum valueForKey:@"object"]];
UIViewController *tController = [self.tabBarController.viewControllers objectAtIndex:3];
int badgeValue = https://www.it610.com/article/[badgeNum intValue];
if (badgeValue >0) {
tController.tabBarItem.badgeValue = https://www.it610.com/article/[NSString stringWithFormat:@"%d",badgeValue];
}else{
tController.tabBarItem.badgeValue = https://www.it610.com/article/nil;
}
做下笔记,省得忘了O(∩_∩)O哈哈~

    推荐阅读