在iPhone上,我该如何制作图标徽章? [英] On the iPhone, how can I make the icon badge?

查看:103
本文介绍了在iPhone上,我该如何制作图标徽章?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我不在应用程序中时设置图标徽章,例如Mail应用程序。
我该怎么做?

I want to set an icon badge while I am not in the application, like the Mail application. How can I do that?

推荐答案

从您的应用程序中,您可以使用 applicationIconBadgeNumber 属性 UIApplication 设置徽章编号:

From within your application you can use the applicationIconBadgeNumber property of UIApplication to set the badge number:

[UIApplication sharedApplication].applicationIconBadgeNumber = 1;

如果您想在没有用户启动应用的情况下更改徽章,则需要使用推送通知服务。 推送通知服务编程指南应该拥有你需要的所有信息。

If you want to change the badge without the user launching your app, you need to use the push notification service. The Push Notification Service Programming Guide should have all the info you need.

这篇关于在iPhone上,我该如何制作图标徽章?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆