내 VC가 MMDrawerController에 포함 된 프로젝트가 있습니다. 문제 appdelegate에서 푸시 알림을 받았지만 알림을받은 특정 화면을 어떻게 열 수 있는지 알 수 없습니다. VC를 centerVC로 만드는 것은 작동하지 않습니다. 내 화면에는 일부 화면에는 뒤로 버튼이 있기 때문에 유용하지 않습니다. 또한mmdrawerController를 사용하는 경우 원격 알림을위한 특정 화면을 열려면 어떻게해야합니까?
[_drawerController.centerViewController.navigationController pushViewController:pushedVC animated :true]
을 사용하고 있지만 쓸모 그것은 화면에 영향을주지 않습니다. 도움이 필요하시면 미리 알려 주시기 바랍니다.
여기에, 나는 또한있는 그 화면에 리디렉션 할 수있어, 라인 아래이 사용한 // 내가 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"];
[email protected]"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];
로 이동 AppDelegate에에서 사용하고 내 코드입니다 하지만 내 MMDrawerController의 Fictionality는 거기에 없습니다. // [[self topMostController] presentViewController : centerViewController animated : NO completion : nil];}
thankyou! 빠른 응답을 위해 그것이 나를 위해 일하지 않고있다. 그것은 뷰 컨트롤러를 rootVC까지 터트려 있지만 그 후에는 내 _screenToBeRedirectedTo 화면을 누르지 않고 있습니다. – Amit
@Amit, – KrishnaCA
@Amit을 확인하겠습니다.이 줄을 사용하고 있는지 말해 주시겠습니까? [_drawerController.centerViewController navigationController] popToRootViewControllerAnimated : false]'또는이 하나 [_drawerController.centerViewController navigationController] popToRootViewControllerAnimated : true]' – KrishnaCA