我已经SVProgressHUD
将其他页面实现到应用程序中。在这个应用程序通知功能是存在的。当我收到通知然后单击它打开主页然后导航特定页面时。在这种情况下,我希望在单击通知时显示我想要显示的时间,SVProgressHUD
直到导航特定页面。我已经SVProgressHUD
在 ' ' 方法下实现了功能,registerForPushNotification
但它不起作用。导航到特定页面后它正在工作。所以我不明白我能做什么。请任何人帮助我。可能吗?
问问题
109 次
1 回答
0
在 didFinishLaunchingWithOptions 中,添加:
//redirect to notification list if its from push notification click
NSMutableDictionary *notification = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
if (notification)
{
//this notification dictionary is same as your JSON payload whatever you gets from Push notification you can consider it as a userInfo dic in last parameter of method -(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
NSLog(@"%@",notification);
[SVProgressHUD showWithStatus:@"Please Wait"];
}
希望这会有所帮助;)
于 2017-12-22T16:23:31.107 回答