我有一个需要每天重复的通知。 用户可以在特定日期关闭它。 有没有简单的方法可以使用UILocalNotification框架完成这个场景?
以2011年3月1日开始每日重复的通知为例,并于3月7日和3月23日停用。
我想出的唯一解决方案是创建:
3月1日至3月6日的6次非重复 UILocation通知 3月8日至3月22日的14次非重复 UILocation通知 1 重复 3月24日的UILocation通知,每天重复这是可行的,但每次用户更改删除日期时都需要重新评估。 这是完成此类场景的最佳方式吗?
编辑:更不用说这个(快速)接近每个应用程序64通知限制的事实。
I have a notification that needs to repeat daily. It can be turned off by the user for specific days. Is there any easy way to accomplish this scenario using the UILocalNotification framework?
Take an example of a notification that repeats daily starting on March 1st, 2011, and is disabled for March 7th, and March 23rd.
The only solution I've come up with is to create:
6 non-repeating UILocation notifications for March 1st through March 6th 14 non-repeating UILocation notifications for March 8th through March 22nd 1 repeating UILocation notification for March 24th, repeating dailyThis is doable, but requires re-evaulation every time the user changes the deletion dates. Is this the best way to accomplish this type of scenario?
Edit: Not to mention the fact that this is approaching (rapidly) the 64-notification limit per app.
最满意答案
我不认为无论如何只为一系列日期建立重复。
I don't see anyway to establish repeats only for a range of dates.
更多推荐
发布评论