我有自定义选项卡控制器图形,它们确实显示了徽章。在 iOS7 下,它们不再显示。在 iOS7 下,徽章的处理方式是否不同?
// loading the custom icons for first tab
UITabBarItem *tabicon1 = [[UITabBarItem alloc] initWithTitle:@"" image:[UIImage imageNamed:@"NewItemsSelected.png"] tag:0];
[tabicon1 setFinishedSelectedImage:[UIImage imageNamed:@"NewItemsSelected.png"] withFinishedUnselectedImage:[UIImage imageNamed:@"NewItemsUnselected.png"]];
UIViewController *first = [self.viewControllers objectAtIndex:0];
[first setTabBarItem:tabicon1];
// testing for waiting items
int items_waiting = [self itemsWaitingCheck:0:1];
if (items_waiting > 0)
{
// displaying items waiting for the first tab
tabicon1.badgeValue = [NSString stringWithFormat:@"%d", items_waiting];
}