如何从我在代码下面使用但不适用于我的tabbar项目中删除徽章.
UITabBarItem *chatbadge=[appDelegate.tabBarController.tabBar.items objectAtIndex:2];
chatbadge.badgeValue=nil;
Run Code Online (Sandbox Code Playgroud)
建议任何解决方案.
kha*_*son 59
尝试通过viewController进行:
UIViewController *viewController = [appDelegate.tabBarController.viewControllers objectAtIndex:2];
viewController.tabBarItem.badgeValue = nil;
Run Code Online (Sandbox Code Playgroud)
Swift版本,这真的很奇怪
self.tabBarController?.viewControllers?[3].tabBarItem.badgeValue = nil
Run Code Online (Sandbox Code Playgroud)
在工作而不是
self.tabBarItem.badgeValue = nil
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
14683 次 |
| 最近记录: |