如何检测按钮按下本地通知事件?

时间:2021-03-01 00:04:36

Hello I am using local notification in my application. When local notification generate then it will look like this image !

您好我在我的应用程序中使用本地通知。当本地通知生成时,它将看起来像这个图像!

local notification Now how detect that user pressed close button or view details buttons? Have any way to detect or handle event on these buttons?

本地通知现在如何检测用户按下关闭按钮或查看详细信息按钮?有办法检测或处理这些按钮上的事件吗?

Thanks in advances...

谢谢你的进步......

1 个解决方案

#1


0  

for view button i think you already know that you can detecet it by - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification ,, but for the close button no way right now to handle it .. also if the screen is locked there is will be no buttons it just will call "view app" in case you unlocked the device.

对于查看按钮我认为你已经知道你可以通过 - (void)应用程序来检测它:( UIApplication *)应用程序didReceiveLocalNotification:(UILocalNotification *)通知,但是对于关闭按钮现在没办法处理它..也如果屏幕被锁定没有按钮它只会调用“查看应用程序”,以防您解锁设备。

#1


0  

for view button i think you already know that you can detecet it by - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification ,, but for the close button no way right now to handle it .. also if the screen is locked there is will be no buttons it just will call "view app" in case you unlocked the device.

对于查看按钮我认为你已经知道你可以通过 - (void)应用程序来检测它:( UIApplication *)应用程序didReceiveLocalNotification:(UILocalNotification *)通知,但是对于关闭按钮现在没办法处理它..也如果屏幕被锁定没有按钮它只会调用“查看应用程序”,以防您解锁设备。