Custom UILocalNotification repeat interval

只愿长相守 提交于 2019-12-02 07:37:08

问题


is there a way to specify which days should an UILocalNotification fire? I want to be able to set different days, lets say: fire a local notification only on mondays, tuesdays and sundays. Is there a way to do that? Huge thanks! Update: Maybe I can set multiple local notifications for each of the days and give each of them a repeatInterval of NSWeekCaldnerUnit. Is this a correct approach?


回答1:


You should use three different local notification then.

For a list of available repeatIntervals see here.




回答2:


Yes You can do it manually by using this method.. dateByAddingTimeInterval().Just enter some time like 24*60*60 to that method which is fired after a day.Try it with some cases you want.



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

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