iOS - 本地通知 - cancelAllLocalNotifications [英] iOS - Local notifications - cancelAllLocalNotifications

查看:40
本文介绍了iOS - 本地通知 - cancelAllLocalNotifications的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能是一个简单的问题:当我调用cancelAllLocalNotifications"时,它是只取消由应用创建的通知,还是也会取消来自其他应用的所有通知?

May be a simple question: When I call "cancelAllLocalNotifications", does it cancel notifications created by the app only or it will cancel all notifications from other apps also?

推荐答案

其他应用创建的通知不受影响.

The notifications created by other apps will not be affected.

来自:本地和推送通知编程指南

"您可以通过调用取消特定的预定通知cancelLocalNotification:在应用程序对象上,您可以取消通过调用 cancelAllLocalNotifications 来安排所有通知."

"You can cancel a specific scheduled notification by calling cancelLocalNotification: on the application object, and you can cancel all scheduled notifications by calling cancelAllLocalNotifications."

尽管这可能不是最好的书面语句,在应用程序对象上"适用于 cancelAllLocalNotifications 和 cancelLocalNotification.

Although, this is probably not the best written sentence, the "on the application object" applies to cancelAllLocalNotifications as well as cancelLocalNotification.

希望有帮助!

这篇关于iOS - 本地通知 - cancelAllLocalNotifications的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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