gpt4 book ai didi

ios - UILocalNotification : detecting alert display

转载 作者:行者123 更新时间:2023-11-29 13:12:09 24 4
gpt4 key购买 nike

我有一个类似日历的 iOS 应用程序,它需要每天在特定的预先计算的时间发出警报。无论如何,是否可以检测是否显示通知警报并设置下一个时间表(无需按“确定”按钮并进入应用程序)?

换句话说:是否可以检测是否按下了 UILocalNotification 的 UIAlertView 的“关闭”按钮?

谢谢

最佳答案

不,您不能根据另一个响应重新触发另一个通知。不过,您可以使用 NSCalendarUnit 简单地为所有剩余的日子创建多个通知。唯一的缺点是您总共只能收到 64 条通知。

This answer显示了一个技巧,可以创建一个通知队列以通过该限制(如果您想查看)。

关于ios - UILocalNotification : detecting alert display,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16998464/

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