我想将 UILocalNotification 的重复间隔自定义为一周中的某些天。我没有找到任何关于此的信息。
I want to customize the repeat interval of a UILocalNotification to be on certain days of the week. I haven't found any information about this.
如何为一周中某些天的通知设置重复间隔,例如,在周日重复通知,星期一和星期五?
How can I program the repeat interval for notifications for certain days of the week, for example, repeat a notification on Sunday, Monday, and Friday?
推荐答案很遗憾你不能设置 repeatInterval 属性 UILocalNotification 仅在特定日期重复。您可以设置每天(每天),每月(每月)或每小时(每小时)重复一次。因此,对于您的问题唯一可行的解决方案是,如果您想在星期日,星期一和星期二设置闹钟,那么您必须设置3个闹钟(星期日,星期一和星期二各一个)而不是一个闹钟。
Unfortunately you cannot set the repeatInterval property of UILocalNotification to repeat only on particular days. You can set either repeat daily (every day), monthly (every month) or hourly (every hour). So the only feasible solution for your question is that if you want to set an alarm on Sunday, Monday and Tuesday then you have to set 3 alarms (one each for Sunday ,Monday and Tuesday) rather than one alarm.
更多推荐
在一周的某些天重复UILocalNotification
发布评论