Any idea why this works:
[[[[[self tabBarController] tabBar] items] objectAtIndex:2]
setBadgeValue:@"Hello"];
But this doesn't?
[[self tabBarItem] setBadgeValue:@"Hello"];
I would rather not have to provide an explicit tab bar index (2 in the code above). Also, is there a way to get the tab bar index from within the view controller in the case where the first snippet is the only way to make this work?
Thanks.