简体   繁体   中英

Notifications in iOS

I have a requirement for an application, when it has multiple notifications and when the user clicks one of those, the rest of the notifications of the same app should still be visible in the notification centre. Normally what happens is those other notifications also get cleared. Is there a way that I can bypass this scenario?

Update - Is there a way that we can access received push notifications in the notification center?

Its done by iOS. Programmers have no control over it.

You can get the notification if the user click on the item in notification center and application is opening from it. Following is the code for it

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   NSDictionary *notification = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
   //your notification will be in the dictionary if application is opening from notification center
   return YES;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM