我已经呈现为ModelViewController登录视图和我有呈现为NavigationControlloer在它上面的寄存器视图:隐藏所有模态的视图控制器
登录(ModelViewController) ---->寄存器(NavigationController )
我在一个LoginView呈现注册视图(的createAccount)如下:
createAccount= [[CreateAccount alloc] initWithNibName:@"CreateAccount" bundle:nil];
navController = [[UINavigationController alloc] initWithRootViewController:createAccount];
UIBarButtonItem *cancelButtun=[[UIBarButtonItem alloc]initWithTitle:@"Cancel" style:UIBarButtonItemStyleBordered target:self action:@selector(HideMe)];
UIBarButtonItem *registerButtun=[[UIBarButtonItem alloc]initWithTitle:@"Register" style:UIBarButtonItemStyleBordered target:self action:@selector(Register)];
createAccount.navigationItem.leftBarButtonItem = cancelButtun;
createAccount.navigationItem.rightBarButtonItem=registerButtun;
[email protected]"Create Account";
[self presentModalViewController:navController animated:YES];
登录控制器具有NSURLConnectionDelegate展位登录和注册。 当登记共完成我只需调用
[self dismissModalViewControllerAnimated:YES];
这将仅解雇登记视图。
我想解雇登录视图,所以我可以回到我的主应用程序。
请说明你是如何呈现的注册视图。这是另一种模态观点吗? – 2011-12-29 18:49:51
我编辑了这篇文章:) – Kassem 2011-12-29 18:53:59