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:
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];
}
}