如何在我的应用程序中使用 iOS 的标准红色数字徽章?

发布于 2024-09-27 03:36:07 字数 1437 浏览 0 评论 0原文

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

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

发布评论

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

评论(3

情话难免假 2024-10-04 03:36:07

你要哪里的徽章?标准徽章可以通过 badgeValue 属性轻松添加到 UITabBarItem 中。它记录在此处

Where do you want the badge? The standard badge can trivially be added to a UITabBarItem through the badgeValue property. It is documented here.

-小熊_ 2024-10-04 03:36:07

我正在使用 Sascha Paulus 的这个 -
http:// www.spaulus.com/2011/04/custombadge-2-0-retina-ready-scalable-light-reflex/?lang=en

这是一个可以放入项目中的类,很容易自定义满足您所寻找的外观。我对红色徽章中的数字的位置有一个小问题,所以我稍微移动了它。除此之外,一切都很好。

I am using this by Sascha Paulus -
http://www.spaulus.com/2011/04/custombadge-2-0-retina-ready-scalable-light-reflex/?lang=en

Which is a class that you can drop into your project, easy enough to customize for the appearance you are looking for. I had a slight issue with the placement of the number within the red badge so I shifted it slightly. Other than that, all good.

奈何桥上唱咆哮 2024-10-04 03:36:07

这个看起来 100% 像 Apple 的,而且它也是完全可定制的: https://github.com/JaviSoto/JSBadgeView< /a>

This one looks 100% like the Apple one and it's also completely customizable: https://github.com/JaviSoto/JSBadgeView

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