TabBar徽章事件和变化
我有一个选项卡栏,默认徽章计数为 6。当用户更改选项卡视图上按钮的值时,我希望调整徽章。 -1或+1。所有按钮都设置为红色,如果用户将值更改为绿色,则徽章会下降到 5。如果从绿色变为红色,则徽章会增加 1 到 6,依此类推。是否有一个事件来处理这个问题,或者我是否需要编写一个方法。有人可以帮忙吗?
谢谢。
I have a tabbar, with a default badge count of 6. When a user changes the value of a button on the tab view, I would like the badge to adjust. -1 or +1. All the buttons are set to red, if the user changes the value to green, then the badge goes down to 5. If the go from green to red, then the badge adds 1 to 6 and so on. Is there an event to handle this, or do I need to write a method. Could someone please help.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您可以尝试使用 UITabbarController 的委托方法
,或者尝试手动调用它....&根据您的意愿设置徽章。
希望能解决您的问题。
I think you could try using the delegate method of UITabbarController
or either try to call it manually ....& set the badge,as per your wish.
Hope that could solve your problem.