我在上午 10:00 创建了一个本地通知,我想在下一次触发第一个通知时根据计算重复通知。
那么如何监听通知触发器来创建下一个通知呢?
注意:我使用了 didRecieve
通知委托(delegate),但它仅在前台的应用程序我想在后台使用相同的东西时才有效。
最佳答案
时间间隔触发器就可以了。
https://developer.apple.com/documentation/usernotifications/untimeintervalnotificationtrigger
Use a UNTimeIntervalNotificationTrigger object for local notifications that you want delivered at a time relative to the current time. You specify the number of seconds that must elapse before the notification fires. You can also set up the trigger to repeat at the specified interval.
关于ios - 不同时间重复通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50000398/