开发者

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

开发者 https://www.devze.com 2023-01-23 18:52 出处:网络
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 interv

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.


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

Here's a list of available repeatIntervals.

0

精彩评论

暂无评论...
验证码 换一张
取 消