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 -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -