如何在点击时清除通知列表中的单个通知?

一旦我点击通知,所有通知都被清除。在ios中,是否有任何选项可以在点击后清除单个通知? 我收到了4条通知。 现在我需要单击通知单独清除并保留其他通知。任何人都可以帮我这个吗? 在此处输入图像描述

- (void) clearNotifications { [[UIApplication sharedApplication] setApplicationIconBadgeNumber: 0]; [[UIApplication sharedApplication] cancelAllLocalNotifications]; } - (void)application:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary*)userInfo { NSLog(@"Received notification: %@", userInfo); [self clearNotifications]; } 

 -(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { // when you tap on any of notification this delegate method will call... [[UIApplication sharedApplication] cancelLocalNotification:notification]; }