NSArray *tabBarItems = self.tabBar.items;
UITabBarItem *personCenterTabBarItem = [tabBarItems objectAtIndex:3];
personCenterTabBarItem.badgeValue = [NSString stringWithFormat:@"%ld",num];
![](https://img.haomeiwen.com/i1533262/f811351595829eb4.png)
消除的时候
NSArray *tabBarItems = self.tabBar.items;
UITabBarItem *personCenterTabBarItem = [tabBarItems objectAtIndex:3];
personCenterTabBarItem.badgeValue = nil;
网友评论