仅在将堆栈弹出到 rootviewcontroller 后,我才尝试将新的视图控制器推送到导航堆栈
//Select the tab I want to go to
self.tabBarController.selectedIndex = FEEDPAGE_INDEX;
//Retrieve the navcon in the feed page
UINavigationController *navcon = (UINavigationController*)[self.tabBarController.viewControllers objectAtIndex:FEEDTAB_INDEX];
//Pop to root view controller here
[navcon popToRootViewControllerAnimated:YES];
//Push a new root view controller onto stack
QuestionAnswerViewController *x = [[QuestionAnswerViewController alloc]init];
[navcon pushViewController:x animated:YES];
推送不起作用,即没有显示新页面。似乎 popToRootViewController 导致这种情况发生(不确定)。关于如何弹出然后推送新页面的任何建议?