我可以自定义 UILocalNotification 重复间隔吗(即仅限工作日?) [英] Can I have custom UILocalNotification repeat intervals (i.e. weekdays only?)

查看:22
本文介绍了我可以自定义 UILocalNotification 重复间隔吗(即仅限工作日?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够安排 UILocalNotification 每天在同一时间重复,但仅限于工作日(周六或周日除外).这是否可以使用 UILocalNotification 的重复间隔功能,或者是我创建某种处理时间和日期并确定何时提前安排(几个)通知的类的唯一选择?

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?

提前致谢.

推荐答案

是的,这是可能的.将 UILocalNotification 的 repeatInterval 设置为 NSWeekdayCalendarUnit.

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

这里是 可用repeatIntervals 的列表.

Here's a list of available repeatIntervals.

这篇关于我可以自定义 UILocalNotification 重复间隔吗(即仅限工作日?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆