Swift 取消本地通知

前端之家收集整理的这篇文章主要介绍了Swift 取消本地通知前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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++ }

猜你在找的Swift相关文章