SHARE
TWEET

Untitled

a guest Jun 17th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. content.title = "Changement de semaine"                        
  2.         content.body = "Nous sommes en semaine (notificationSemaineAB())"    
  3.         content.sound = UNNotificationSound.default                  
  4.  
  5.         var dateComponent = DateComponents()
  6.         dateComponent.weekday = 2
  7.         dateComponent.hour = 11
  8.  
  9.         let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponent, repeats: true)
  10.  
  11.         let request = UNNotificationRequest(identifier: "semaineAB", content: content, trigger: trigger)
  12.         UNUserNotificationCenter.current().add(request)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top