简体   繁体   English

从iOS通知面板激活应用程序时,是否可以处理所选的本地通知?

[英]Is it possible to handle the selected local notification when activing the app from iOS notification panel?

When launching the app from a local notification you can use the application:didFinishLaunchingWithOptions: method of ApplicationDelegate to handle the notification, but this method is not called when you select the notification in the notifications panel and the app is in background. 从本地通知启动应用程序时,可以使用ApplicationDelegate的application:didFinishLaunchingWithOptions:方法来处理通知,但是当您在通知面板中选择通知并且应用程序处于后台时,不会调用此方法。

Is there a way to handle the notification in that case? 在这种情况下,有没有办法处理通知?

I want to show a special viewcontroller when the app becomes active by this cause. 当应用程序由于此原因而处于活动状态时,我想显示一个特殊的ViewController。

Thanks in advance! 提前致谢!

您是否检查了以下委托方法

- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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