0

我之前问过同样的问题,但现在我改变了实现标签栏的方式,我有这个视图

第二种观点

我希望当我按下一个按钮时,它会创建一个由 5 个按钮组成的标签栏,我可以在第一个视图中选择它

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
    // Override point for customization after application launch.
    AcceuilViewController *viewController =[[[AcceuilViewController alloc]
                                             initWithNibName:@"AcceuilViewController" bundle:nil]autorelease];
    self.navController = [[[UINavigationController alloc]initWithRootViewController:viewController]
                         autorelease];
   self.window.rootViewController = self.navController;
    [self.window makeKeyAndVisible];
    return YES;
}
4

1 回答 1

0

照常创建您的 UITabBarController。当用户触摸按钮时,按下该控制器:

YourTabController *tabController = [[YourTabController alloc] initWithNibName:@"Tabs" bundle:nil];
[self.navController pushViewController:tabController animated:YES];
于 2013-08-10T18:23:27.887 回答