var notifyCancel = UILocalNotification() var notifyArray=UIApplication.sharedApplication().scheduledLocalNotifications var i 0 while(i<notifyArraycount){if let notify notifyArray[] as?{ let info notifyuserInfo asDictionary<String,> let s info["name"ifname==s){//name is the the one you want cancel notifyCancel notify break}}
i++ }
原文链接:https://www.f2er.com/swift/327559.html