ios - 使用 DateComponents 设置重复通知触发器
问题描述
目前正在开发一个应用程序需要设置不同类型的重复通知规则
喜欢每天重复,工作日,工作日或一周中的几天。
var dateInfo = DateComponents()
dateInfo.hour = 7
dateInfo.minute = 0
dateInfo.weekday = 1
let trigger = UNCalendarNotificationTrigger(dateMatching: dateInfo, repeats: true)
使用这个API每次只能添加一周中的一天,有没有简单的方法。
赞赏
解决方案
推荐阅读
- swift - AX 查找问题 - 错误代码:1100 Permission Denied portName
- javascript - DNA配对挑战
- python - /social/complete/facebook/ 处的 social_django TypeError 需要一个类似字节的对象,而不是“元组”
- flutter - 如何为flutter应用程序中的所有对话框设置barrierColor?
- android - 通过提供程序更改子项的状态后,父小部件正在重新渲染
- r - 目标包中缺少文件时触发代码
- json - Xamarin Forms:如何在没有稳定密钥的情况下解析 JSON 响应?
- python - 在任务成功/失败时重新安排 DAG
- node.js - Nodemailer错误错误:更新nodemailer后从未收到问候
- salesforce - Salesforce,从数据库中选择并添加到联系人列表