tabBar显示数字气泡

NSArray *tabBarItems = self.tabBar.items;

UITabBarItem *personCenterTabBarItem = [tabBarItems objectAtIndex:3];

personCenterTabBarItem.badgeValue = [NSString stringWithFormat:@"%ld",num];

tabBar显示数字气泡_第1张图片

消除的时候

NSArray *tabBarItems = self.tabBar.items;

UITabBarItem *personCenterTabBarItem = [tabBarItems objectAtIndex:3];

personCenterTabBarItem.badgeValue = nil;

你可能感兴趣的:(tabBar显示数字气泡)