gpt4 book ai didi

iphone - 自动从 iOS 通知中心删除 UILocalNotification

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:20:38 25 4
gpt4 key购买 nike


我正在尝试发送 UILocalNotifications,并在一定时间间隔后从通知中心自动删除它们。
我的应用向用户发送的信息在发送后大约 5 分钟内将变得无关紧要。
每天至少会有 3 条通知。
由于通知信息在几分钟内将变得无关紧要,因此最好从通知中心删除这些通知 - 因为它们与用户无关。

有什么办法可以实现吗?某种本地通知的“自毁”选项?

谢谢!

最佳答案

如果您的问题是在不将应用程序置于前台的情况下从通知中心删除通知(新通知清除旧通知),那么答案是直接“否”。

Without user accepting the older notification or manually brings the application to foreground - It is not possible.

这个功能可能会出现在 iOS7 中!

关于iphone - 自动从 iOS 通知中心删除 UILocalNotification,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18703919/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com