0

tabBarItem用图像创建了一个。我已经badgeValue为它设置了,它显示了消息的数量。显示时badgeValue,该 tabBarItem 图像突然缩小。这是情况的屏幕截图:

截屏

这是我使用的代码:

[tabbaritem4 setFinishedSelectedImage:[UIImage imageNamed:@"Btn_Taskbar_Chat-Over.fw.png"] withFinishedUnselectedImage:[UIImage imageNamed:@"Btn_Taskbar_Chat.fw.png"]];
tabbaritem4.imageInsets=UIEdgeInsetsMake(25,12,10,13);

-(void)getAllUnReadMessages:(NSInteger)countMessage
{
    if(countMessage >= 1)
    {
        [tabbaritem4 setBadgeValue:[NSString stringWithFormat:@"%d",countMessage]];
    }
    else
    {
        [tabbaritem4 setBadgeValue:nil];
    }
}
4

0 回答 0