How to repeat local notifications on specific days of the week (iOS Swift 3)

不想你离开。 提交于 2019-11-29 13:01:29

The thing that I'm having trouble with now is being able to fire the local notification on specific days of the week

In iOS 10, a UNCalendarNotificationTrigger is formed using DateComponents. This means you can specify as much or as little of the date-time in question as you wish. Thus, if you specify a specific weekday and a time (hour and minutes), and nothing else, you'll repeat at that time on that day of the week.

If you also need to repeat on a different day of the week, just make another notification.

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