我正在实现一个iPhone应用程序,这是一个基于标签栏的应用程序。一开始,我抛出了一个Modal View,它显示了一个登录表单。如果登录成功,我将忽略此模态视图,然后显示选项卡栏导航的第一个选项卡。问题是我需要将用户信息从模态视图传递到选项卡栏的控制器。 我有这么远是: 在我的AppDelegate:从模态视图传递值到标签栏控制器
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
tabBarController.delegate = self;
// Add the tab bar controller's view to the window and display.
self.window.rootViewController = self.tabBarController;
[self addTabBarArrow];
[self.window makeKeyAndVisible];
//Throw up the Modal View
InicioAppModalViewController *tempView = [[InicioAppModalViewController alloc] initWithNibName:@"InicioAppModalView" bundle:nil];
[self.tabBarController presentModalViewController:tempView animated:true];
[tempView release];
return YES;}
在我InicioAppModalViewController我通过点击导航按钮的项目有2个功能抛出了一个模态视图登录表单:
- (IBAction)showModalLoginForm:(id)sender {
LoginViewController * loginVC = [[LoginViewController alloc] initWithNibName:@"LoginView" bundle:nil];
[self presentModalViewController:loginVC animated:YES];
[loginVC release]; }
然后,在这种形式中,我刚刚得到了一些TextFields,并且我使用NSURLConnection方法进行了验证,如果登录是OK的。之后,在解除此模态视图之前,我想将用户信息发送到导航栏控制器。
我该如何执行它?有什么建议么?
在此先感谢!
我宁愿使用代表团。我在网上看过一些教程,但任何人都有模态视图和标签栏视图分布。 – Ruben
@Ruben现在更改我的答案的措辞:) –
:)你是对的,“苹果推荐”......你能检查我在我的问题中所做的修改吗?也许你可以帮助我更好 – Ruben