自定义警报的 UILocalNotification 重复间隔(周日、周一、周二、周三、周四、周五、周六)
我使用 UILocalNotification
来实现警报目的。我有一个基于工作日(周日、周一、周二、周三、周四、周五、周六)重复的自定义选项。很多应用程序都执行了这个过程。我尽力了我的水平。但我无法让它发挥作用。请大家帮帮我......
I'm using UILocalNotification
for Alarm Purpose. I have a custom option for repeat based on weekdays (sun, mon, tue, wed, thu, fri, sat). So many applications did this process. I tried My level best. But I can't get it to work. Please you guys help me....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您无法使用 UILocalNotification< 设置自定义重复间隔/a>.之前已经有人问过这个问题(见下文),但只提供了有限的选项。 repeatInterval 参数 是一个枚举类型,它限制为 具体值。
您无法将这些枚举相乘并获得这些间隔的倍数。您的应用程序中设置的本地通知不能超过 64 个。一旦通知触发,您就无法重新安排通知,除非用户选择在通知触发时运行您的应用程序(他们可能不会运行它)。
此处发布了重复间隔乘数的请求。您可以添加评论。我建议向 Apple 提交错误报告或功能请求(url?)。
You cannot set custom repeat intervals with UILocalNotification. This has been asked before (see below) but only limited options are provided. The repeatInterval parameter is an enum type and it limited to specific values.
You cannot multiply those enumerations and get multiples of those intervals. You cannot have more than 64 local notifications set in your app. You cannot reschedule a notification once it fires unless the user chooses to run your app when the notification fires (they may not run it).
There is a request for repeat interval multipliers posted here. You can add comments to it. I suggest filing a bug report or feature request (url?) with Apple.