简体   繁体   English

iPhone:在基于视图的应用程序中,我如何从第四屏切换到第一屏

[英]iphone:In view based application how can I move from 4th screen to 1st screen

I am creating view based application and in this application I want to directly switch over to 1st screen from 4th screen then how can I do this? 我正在创建基于视图的应用程序,在此应用程序中,我想直接从第4屏幕切换到第1屏幕,然后该怎么做?

My code to go to next view is as follows: 我要转到下一个视图的代码如下:

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

Any idea? 任何想法? if yes then share it 如果是,然后分享

The same way you switch screens using pushViewControllers and popViewControllers to any other screen. 使用pushViewControllerspopViewControllers将屏幕popViewControllers到任何其他屏幕的方式相同。 Use 采用

[self.navigationController popToRootViewControllerAnimated:YES];

The first view is the root view you see so simply put this line and it will pick up the firstView. 第一个视图是您看到的根视图,因此只需放置此行,它将拾取firstView。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM