在图标上添加推送通知红色气泡

发布于 2024-12-21 13:36:57 字数 276 浏览 5 评论 0原文

我需要具有类似的功能,如图像。我将有一个 UITabBarController,在第一个视图上我有一个 TableView。填充到该表视图的数据将来自远程服务器。

当我的应用程序空闲或不活动时,以及当有一组新数据来自服务器时,我需要在“红色气泡”中显示新记录的数量,如图所示。

I need to have a similar functionality as shown in the image. I will have a UITabBarController and on the first view i have a TableView. Data populated to this table view will come from a remote server.

When my application is idle or when it is inactive and when there is a new set of data coming from the server, I need to display the number of new records in that "Red bubble" as shown in the image.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

筱武穆 2024-12-28 13:36:57

如果您想在应用程序图标上显示徽章编号,请使用以下代码:

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:1];

它将在应用程序图标上显示1。

If you want to show badge number on the application icon, use the following code:

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:1];

it will display 1 on the application icon.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文