Ich versuche, die UILocalNotifications zu planen. Die Funktionalität, die ich implementieren möchte, ist, dass die Benachrichtigung an einem bestimmten Tag, wie (jeden Montag), der vom Benutzer ausgewählt wird, zu wiederholen. Gibt es eine Möglichkeit, die UILocalNotification zu planen, sodass die Benachrichtigung nur an diesem Tag ausgelöst wird?Planen Sie die UILocalNotifiation am selben Tag swift
let notification = UILocalNotification()
let dict:NSDictionary = ["ID" : "your ID goes here"]
notification.userInfo = dict as! [String : String]
notification.alertBody = "\(title)"
notification.alertAction = "Open"
notification.fireDate = dateToFire
notification.repeatInterval = .Day // Can be used to repeat the notification
notification.soundName = UILocalNotificationDefaultSoundName
UIApplication.sharedApplication().scheduleLocalNotification(notification)
Ja, erstellen Sie zuerst Ihre Schaltflächen, um den Tag auszuwählen, an dem LocalNotification ausgelöst werden soll. – Khuong