push通知受信時に特定の画面に遷移をさせたい。
画面の構成は以下のようになっています。
Tabbarcontroller-TopNavigationController-TopFirstViewcontroller-TopSecondeViewcontroller
-MiddleNavvigationController-MiddleFirstviewController-MiddleSecondViewcontroller
push通知受信時の
lang
1- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{ 2}
でMiddleSecondViewcontrollerを表示させるにはどのようにしたらいいでしょうか?
lang
1- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{ 2 UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; 3 UINavigationController *nc = [storyboard instantiateViewControllerWithIdentifier:@"MiddleNavigationController"]; 4 MiddleSecondViewcontroller *ct = [storyboard instantiateViewControllerWithIdentifier:@"MiddleSecondViewController"]; 5 [nc pushViewController:ct animated:YES]; 6} 7
上記の場合、想定の画面に遷移するのですが、MiddleFirstviewControllerに戻ったときにTabbarがない状態になってしまいます。
うまくいく方法を教えていただきたいです。
あなたの回答
tips
プレビュー