2012-09-13 92 views
0

我正在创建基于视图的应用程序,并且在此应用程序中我想直接从第4个屏幕切换到第1个屏幕,那么我该怎么做?iphone:在基于视图的应用程序中,如何从第4个屏幕移动到第1个屏幕

我的代码去下一个视图如下:

NewProposalDetail *newDetail = [[NewProposalDetail alloc] initWithNibName:@"NewProposalDetail" bundle:nil]; 
    [self presentModalViewController:newDetail animated:YES]; 
    [newDetail release]; 

任何想法? 如果是,然后分享它

回答

1

与使用pushViewControllerspopViewControllers将屏幕切换到任何其他屏幕的方法相同。使用

[self.navigationController popToRootViewControllerAnimated:YES]; 

第一个视图是你看到的根视图,所以简单地把这条线,它会拿起firstView。

+0

我的应用程序是基于模型的应用程序 – iPhone

+0

模态视图的数量是否固定? – IronManGill

+0

是的,有5个视图 – iPhone

相关问题