我曾经在我的应用程序,远程推送通知时打开的应用程序被关闭,并通知出现在iPhone和用户打开它,应用程序在指定的视图中打开,在正常的这种观点有后退按钮viewcontrolA,但是从通知打开时返回按钮不好玩,我需要帮助来解决它。 后退按钮消失的时候认为从远程推送通知
didFinishLaunchingWithOptions:
if (launchOptions != nil)
{
NSDictionary* dictionary1 = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
NSDictionary* dictionary2 = [launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey];
if (dictionary1 != nil)
{
NSLog(@"Launched from push notification: %@", dictionary1);
double delayInSeconds = 7;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
// [self addMessageFromRemoteNotification:dictionary1 updateUI:NO];
});
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
UIStoryboard *story=[UIStoryboard storyboardWithName:@"MainiPad" bundle:nil];
MFSideMenuContainerViewController *controller=(MFSideMenuContainerViewController*)self.window.rootViewController;
UINavigationController *mainVC=[story instantiateViewControllerWithIdentifier:DetailsSearchNav];
[self.window makeKeyAndVisible];
[controller.shadow setOpacity:0.75f];
[controller setCenterViewController:mainVC];
UIViewController *leftController=[story instantiateViewControllerWithIdentifier:@"LeftSideViewController"];
[controller setRightMenuViewController:leftController];
[controller setLeftMenuViewController:nil];
}
if (dictionary2 != nil)
{
NSLog(@"Launched from dictionary2dictionary2dictionary2 notification: %@", dictionary2);
double delayInSeconds = 7;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
// [self addMessageFromRemoteNotification:dictionary2 updateUI:NO];
});
}
}
,我认为你提出的viewcontrller –
我推出它从应用委托 –
你能证明你的代码 –