Question

Is it possible to programmable set a badge value on a TabBar which is made in Interface Builder (Xcode4). I have four tabs and I would like to have a badge on the forth tab if there is unread items in the inbox that is behind the tab.

Or do I have to rebuild the tabbar by code to be able to do this?

Thanks for any thoughts on this.

Was it helpful?

Solution

You can set it as -

UITabBarItem *tbi = (UITabBarItem*)[[[self.tabBarController tabBar] items] objectAtIndex:3];

[tbi setBadgeValue:@"1"];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top