swift - How to repeat and end repeat local notification is iOS 10? -


the system app 'reminder' can set repeat , end repeat, ios 10usernotification.framework not support function. using uncalendarnotificationtrigger push local notification. how can implement repeat , end repeat function? thanks.

let datec = calendar.current.datecomponents([.day, .hour, .minute], from: startdate!)  let trigger = uncalendarnotificationtrigger(datematching: datec, repeats: true)  let content = unmutablenotificationcontent() content.title = "title" content.body = "body"  let request = unnotificationrequest(identifier: testidentifier, content: content, trigger: trigger)  center.add(request) { (error) in     if let error = error {         print(error)         return     }      print("scheduled") } 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -