【问题标题】:Detect when a user clears notification from the notification center检测用户何时从通知中心清除通知
【发布时间】:2012-12-17 19:06:44
【问题描述】:

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

是否可以检测用户何时从通知中心删除通知或在通知中心获取通知数组?

【问题讨论】:

    标签: objective-c ios


    【解决方案1】:

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

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

    【讨论】:

    • 所以它没有通知应用它创建的通知已被清除?
    • 不,它甚至不会告诉您是否收到了推送通知。这是火灾和忘记。如果它没有运行,它甚至会如何告诉你的应用程序任何事情。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-31
    • 2012-07-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-07
    相关资源
    最近更新 更多