我通过presentModalViewController通过那里的意见做了一个应用程序。ios5 presentmodalviewcontroller多视图
第一视图是ViewController.m
#import "secondview.h"
- (IBAction)pushme:(id)sender {
secondview *second = [[secondview alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:second animated:YES];}
第二视图是secondview.m
#import "thirdview.h"
- (IBAction)dismiss:(id)sender {
[self dismissModalViewControllerAnimated:YES];}
-(IBAction)gohead:(id)sender{
thirdview *third = [[thirdview alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:third animated:YES];}
第三视图thirdview.m
- (IBAction)backtomain:(id)sender {
[self dismissModalViewControllerAnimated:YES];}
我的问题是当我在第三个视图中单击按钮(backtomain)时,我想返回第一个视图,而不是第二个视图。所以我如何组织backtomain功能?
谢谢〜
嗨,我是一个初学者,所以我不能很好地理解你的代码,这里是我的文件:http://www.tempfiles.net/download/201203/232758/delay-actions.html,你可以检查它吗? – 2012-03-02 20:25:50