Im developing an iOS app using objective c. in my app if user is not register then register view controller is rootViewController
. if user is register then tabBarController
having three tabs is rootViewController
. i have to set tabBarItem
badge value from any view controller. suppose if i am on third tab and it is having segue with another view controller and i am on that view controller, i have to change the tabBarItem
badge value of first view controller from here. in my case the tabBarItem
badge value update only i go to that tab as i am using
NSString *upcomingcount=[NSString stringWithFormat:@"%lu",(unsigned long)self.arrbadge.count];
self.navigationController.tabBarItem.badgeValue=upcomingcount;
in viewwillappear.
is there any way to set the badgeValue from any ViewController
? i want to update badge value from any ViewController