我正在实现一个基于拆分视图的应用程序。
我在左视图/根视图底部的应用程序中有 3 个用于 3 个根视图的选项卡。为此,我将三个视图控制器添加到应用程序删除的标签栏。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
RootViewController *tab1 = [[RootViewController alloc] init];
DashboardViewController *tab2=[[DashboardViewController alloc] initWithNibName:@"DashboardViewController" bundle:nil];
SendUpdatesViewController *tab3=[[SendUpdatesViewController alloc] initWithNibName:@"SendUpdatesViewController" bundle:nil];
NSArray *tabViewArray=[[NSArray alloc] initWithObjects:tab1,tab2,tab3,tabBar, nil];
tabBar=[[UITabBarController alloc] init];
[tabBar setViewControllers:tabViewArray];
self.splitViewController.viewControllers = [NSArray arrayWithObjects:tabBar,_detailViewController, nil];
self.window.rootViewController = self.splitViewController;
[self.window makeKeyAndVisible];
return YES;
}
现在我需要为这些选项卡添加标题图标和相应的操作。