标签: ios swift notifications
我想设置每周重复的通知。该怎么做,我没有看到NSCalendarUnit.Week,只看到NSCalendarUnit.Day,我无法设置NSCalendarUnit.Day * 7。那么,怎么做呢? notification.repeatInterval = NSCalendarUnit.WeekOfMonth有效吗?
NSCalendarUnit.Week
NSCalendarUnit.Day
NSCalendarUnit.Day * 7
notification.repeatInterval = NSCalendarUnit.WeekOfMonth
notification.repeatInterval = NSCalendarUnit.
答案 0 :(得分:2)
WeekOfMonth或WeekOfYear怎么样?它们有两种不同的实现方式,因此请务必阅读两者的文档。或者查看this帖子。
WeekOfMonth
WeekOfYear