Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove Badge from tabbar item

Tags:

iphone

How to Remove Badge from the tabbar item i had use below code but not working for me.

UITabBarItem *chatbadge=[appDelegate.tabBarController.tabBar.items objectAtIndex:2]; chatbadge.badgeValue=nil; 

Suggest any Solution.

like image 204
japs Avatar asked Mar 19 '10 11:03

japs


1 Answers

Try doing it via the viewController:

UIViewController *viewController = [appDelegate.tabBarController.viewControllers objectAtIndex:2];  viewController.tabBarItem.badgeValue = nil; 
like image 131
kharrison Avatar answered Oct 04 '22 10:10

kharrison