Can I have custom UILocalNotification repeat intervals (i.e. weekdays only?)

大憨熊 提交于 2019-12-10 23:37:51

问题


I would like to be able to schedule a UILocalNotification to repeat at the same time every day, but only on weekdays (no Saturdays or Sundays). Is this possible using the repeat interval feature of UILocalNotification, or is my only option to create some kind of class that handles the time and date and works out when to schedule (several) notifications in advance?

Thanks in advance.


回答1:


Yes, this is possible. Set the repeatInterval of the UILocalNotication to NSWeekdayCalendarUnit.

Here's a list of available repeatIntervals.



来源:https://stackoverflow.com/questions/4121121/can-i-have-custom-uilocalnotification-repeat-intervals-i-e-weekdays-only

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