add
This commit is contained in:
@@ -27,12 +27,12 @@
|
||||
-(void)sendLocalNotification:(NSString *)alertBoday fireTimeInterval:(NSTimeInterval )timeInterval alertAction:(NSString *)alertAction withIdentifier:(NSString *)identifier;
|
||||
|
||||
/**
|
||||
删除当前程序注册的所有通知 ios 8 后 iOS10 前
|
||||
删除当前程序注册的所有通知
|
||||
*/
|
||||
-(void)cancelAllLocalNoitification;
|
||||
|
||||
/**
|
||||
删除指定的通知,一般用于取消重复的通知或者还没有被调用的通知,先获取通知,再遍历根据条件去删除(条件是 UserInfo 的值,是发送通知时所携带的参数) ios 8 后 iOS10 前
|
||||
删除指定的通知,一般用于取消重复的通知或者还没有被调用的通知,先获取通知,再遍历根据条件去删除(条件是 UserInfo 的值,是发送通知时所携带的参数)
|
||||
*/
|
||||
-(void)cancelLocalNitificationByUserInfowithIdentifier:(NSString *)identifier;
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
*/
|
||||
-(void)didResaveloaclNitification:(UILocalNotification *)localNitification;
|
||||
|
||||
|
||||
//处理通知。。
|
||||
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
if (@available(iOS 10.0, *)) {
|
||||
|
||||
[[UNUserNotificationCenter currentNotificationCenter] removeAllDeliveredNotifications];
|
||||
[[UNUserNotificationCenter currentNotificationCenter] removeAllPendingNotificationRequests];
|
||||
|
||||
} else {
|
||||
// Fallback on earlier versions
|
||||
@@ -87,7 +87,7 @@
|
||||
-(void)cancelLocalNitificationByUserInfowithIdentifier:(NSString *)identifier{
|
||||
|
||||
if (@available(iOS 10.0, *)) {
|
||||
[[UNUserNotificationCenter currentNotificationCenter] removeDeliveredNotificationsWithIdentifiers:@[identifier]];
|
||||
[[UNUserNotificationCenter currentNotificationCenter] removePendingNotificationRequestsWithIdentifiers:@[identifier]];
|
||||
} else {
|
||||
// Fallback on earlier versions
|
||||
NSArray *notifiArray = [[UIApplication sharedApplication] scheduledLocalNotifications];
|
||||
|
||||
Reference in New Issue
Block a user