didReceiveLocalNotification
。如何通过点按本地通知而不是应用图标来确定该应用变为有效状态。
答案 0 :(得分:1)
这是一种在UILocalNotification
解雇时检测应用状态的简便方法,如果是
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
被叫,这可以确保收到本地通知。
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
UIApplicationState state = [application applicationState];
if (state == UIApplicationStateInactive) {
// Application was in the background when notification was delivered.
} else {
}
}