Monday, February 22, 2010

How to Clear UITabBar badgeValue

It's delightfully easy to add a badgeValue into a UITabBarItem, but I couldn't find how to remove it. Turned out it's as easy as adding one:

if (count)
    self.parentViewController.tabBarItem.badgeValue = @"!";
else
    self.parentViewController.tabBarItem.badgeValue = nil;
Thanx Apple for these delightful surprises!

1 comment:

  1. thank you, jouni, so much! it works!

    ReplyDelete