Iphone 如何使用pushcontroller访问RootViewController?
通过下面的代码,我将从firstView移动到RootViewControllerIphone 如何使用pushcontroller访问RootViewController?,iphone,xcode,Iphone,Xcode,通过下面的代码,我将从firstView移动到RootViewController RootViewController *controller = [[RootViewController alloc] initWithNibName:@"RootView" bundle:nil]; [self.navigationController popToRootViewControllerAnimated:YES]; [con
RootViewController *controller = [[RootViewController alloc]
initWithNibName:@"RootView" bundle:nil];
[self.navigationController popToRootViewControllerAnimated:YES];
[controller release];
现在,如何使用push而不是pop从上一个视图移动到RootViewController?????
我们得把流行音乐改成推?
有人能帮我推荐一下这个的代码吗?popToRootViewControllerAnimated将弹出到堆栈的开头
myRoot -> firstView -> secondView -> thirdView
如果要使用在第三视图中激活的PoptorootView控件,它将弹出到myRoot。我们不能使用PushTorootView控件吗?我希望从第三视图中选择myRoot->firstView->SecondView->thirdView->myRoot。我打算使用pop,但我可以使用push概念吗?PushToRootViewController不存在,所以您不能使用它。另外,从thirdView推到myRoot也没有意义,但您可以像任何其他视图一样初始化并推到它。虽然使用不友好,但您会混淆用户,myRoot现在会有一个返回按钮弹出到第三视图。或者我们可以使用[self.navigationController pushViewController:controller animated:YES];是的,但正如我前面解释的,myRoot现在将有一个返回按钮,它将弹出到thirdView。