改变其他viewcontroller 的tabbar 的 badgeValue
UIViewController *tController = [self.tabBarController.viewControllers objectAtIndex:2];
int badgeValue = [tController.tabBarItem.badgeValue intValue];tController.tabBarItem.badgeValue = [NSString stringWithFormat:@"%d",badgeValue+1];
如果想改变自己的(一个navigation下的controller)
self.navigationController.tabBarItem.badgeValue = nil;

本文介绍如何在iOS应用中修改导航控制器下特定ViewController的TabBar Badge值,包括更新指定索引位置的ViewController以及当前ViewController的Badge值。
966

被折叠的 条评论
为什么被折叠?



