Custom repeat interval for UILocalNotification

假装没事ソ 提交于 2019-12-28 03:51:26

问题


I tried the Re.minder app and noticed that it can repeat reminders with custom intervals (such as every 3 minutes, every 2 hours, every 4 days,...).

How can I do that?


回答1:


Thanks for trying our app! It turns out, we're not actually using UILocalNotification repeatInterval to accomplish that. Given it's limitations (only one NSCalendarUnit), we actually wrote our own scheduler. This has it's own limitations, mainly the 64 local notification queue limit per app. We essentially schedule and build our own queue, then fill the local notifications from that. Any time the user launches or makes a change in the app we reschedule.

Hope that helps!



来源:https://stackoverflow.com/questions/5762517/custom-repeat-interval-for-uilocalnotification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!