0

I have created a tabBarItem with an image. I have set badgeValue for it, which displays count of messages. When badgeValue is displayed, that tabBarItem image shrinks suddenly. Here is a screenshot of the situation:

screenshot

And here is the code I used:

[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];
    }
}
rdurand
  • 7,342
  • 3
  • 39
  • 72
user2134883
  • 255
  • 1
  • 2
  • 9

0 Answers0