a guest Jun 17th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- content.title = "Changement de semaine"
- content.body = "Nous sommes en semaine (notificationSemaineAB())"
- content.sound = UNNotificationSound.default
- var dateComponent = DateComponents()
- dateComponent.weekday = 2
- dateComponent.hour = 11
- let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponent, repeats: true)
- let request = UNNotificationRequest(identifier: "semaineAB", content: content, trigger: trigger)
RAW Paste Data