检测用户何时从通知中心清除通知 [英] Detect when a user clears notification from the notification center

查看:81
本文介绍了检测用户何时从通知中心清除通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序需要知道用户是否使用清除按钮从通知中心删除/清除了应用程序通知.

My app needs to know if a user deletes/clears the apps notifications from the notification center using the clear button.

是不是要检测用户何时从通知中心删除通知,还是在通知中心获取一系列通知?

Is there either away to detect when the user removes the notification from the notification center or grab an array of notification on the notification center?

推荐答案

您(即App)无法与NotificationCenter进行交互,NotificationCenter与用户进行交互.用户可以选择不接收任何推送通知.

You (ie App) cannot interact with NotificationCenter, NotificationCenter interacts with the user. A user can choose not to receive any push-notifications.

http://developer.apple .com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html

这篇关于检测用户何时从通知中心清除通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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