我正在使用以下代码在当前标签栏中设置徽章值,但它在标签栏中不可见
self.navigationController.tabBarItem.badgeValue = @"1"
在标签栏中放置徽章值的正确方法是什么。
最佳答案
这是我访问 tabBarItem 上的 badgeValue 的方式:
UITabBarItem * tabBarItem = (UITabBarItem *)[aTabBarController.tabBar.items objectAtIndex:1];
tabBarItem.badgeValue = @"1";
关于iphone - 如何在 iphone 的 tabbar 中设置徽章值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2392003/