-1

我有一个视图控制器,它是我的rootviewcontroller,即LoginviewController。在从loginviewcontroller 单击按钮时,我想转到tabbarcontroller,现在请告诉我如何通过界面构建​​器从loginviewcontoller 按钮单击时创建tabbar 控制器,而不是使用情节提要或以编程方式。我正在使用 xcode 4.5.2 和 sdk 6

4

2 回答 2

1

Inside Application 确实完成了启动添加

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  LogInVC *LoginVCObj = [[LogInVC alloc] init withNibNamed:"LogInVC" bundle:nil]; 
  LoginVCObj.delegate = self;
  [window LoginVCObj.view];
  [window makeKeyAndVisible];
}

// when logs in successfully
- (void)logInSuccessfully 
{
UIViewController *viewController1 = [[MyFirstVC alloc] initWithNibName:@"MyFirstVC" bundle:nil]; 
 UIViewController *viewController2 = [[MySecondVC alloc] initWithNibName:@"MySecondVC" bundle:nil]; 
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, nil];
[window addSubview:tabBarController.view];
}
于 2013-02-19T06:51:46.233 回答
0

成功登录后,您可以将其重定向到自定义标签栏。您可以在此链接中查看自定义标签栏的步骤

希望这可以帮助你:)

于 2013-02-19T06:56:18.247 回答