I have a project in which my VCs are embedded in MMDrawerController. Problem I have received push notifications in my appdelegate but I don't know how can I open that particular screen for which I have received the notification. Making VC as centerVC will not work. It is not useful in my case because some screens have back button. I have also used
[_drawerController.centerViewController.navigationController pushViewController:pushedVC animated :true]
But its useless It doesn't have any impact on screens. Any help is appreciated in advance.
Here is my Code which i'm using in AppDelegate to go to ChatVC
-(void)GotoChatVCNotification{
UIColor *navBarColor = [UIColor colorWithRed:52.0/255.0 green:56.0/255.0 blue:52.0/255.0 alpha:1.0];
[[UINavigationBar appearance] setBarTintColor:navBarColor];
NSDictionary *titleDict = [NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],NSForegroundColorAttributeName, nil];
[[UINavigationBar appearance] setTitleTextAttributes:titleDict];
UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
ChatVC *centerViewController = [storyBoard instantiateViewControllerWithIdentifier:@"ChatVC"];
centerViewController.User_id = [APPDELEGATE.userDetailsDic objectForKey:@"user_id"];
_otherUserID=[self.dicPushData valueForKey:@"sender_id"];
centerViewController.Reciever_id = [self.dicPushData valueForKey:@"sender_id"];
centerViewController.strFrom=@"notification";
centerViewController.strFriendId = [self.dicPushData valueForKey:@"sender_id"];
centerViewController.strProjectId = [self.dicPushData valueForKey:@"project_id"];
centerViewController.strChatUserName = [self.dicPushData valueForKey:@"full_name"];
centerViewController.strSupportChat = @"Chat";
[[APPDELEGATE.sideController.centerViewController navigationController] popToRootViewControllerAnimated:false];
[[APPDELEGATE.sideController.centerViewController navigationController] pushViewController:centerViewController animated:false];
//I have also used this below line, by which i'm able to redirect on that screen, but my MMDrawerController's Fictionality is absent there. // [[self topMostController] presentViewController:centerViewController animated:NO completion:nil];}