1

UITabBarController を作成するための次のコードを作成しました

{
    NSMutableArray *arr = [[NSMutableArray alloc]init];
    STPC_AgendaController *agendaController = [[STPC_AgendaController alloc]initWithNibName:@"STPC_AgendaController" bundle:nil];

    STPC_Sponserer *Sponserer = [[STPC_Sponserer alloc]initWithNibName:@"STPC_Sponserer" bundle:nil];
    Sponserer.tabBarItem.title = @"Sponsors";
    STPC_AboutUsViewController  *aboutUs = [[STPC_AboutUsViewController alloc]initWithNibName:@"STPC_AboutUsViewController" bundle:nil];
aboutUs.tabBarItem.title = @"About us";

    UINavigationController *agendaNavigation = [[UINavigationController alloc]
                                                initWithRootViewController:agendaController];

    agendaNavigation.tabBarItem.title = @"Agenda";

    self.navigationController.navigationBarHidden = YES;
    self.tabController = [[UITabBarController alloc]init];
    [arr addObject:agendaNavigation];
    [arr addObject:Sponserer];
    [arr addObject:aboutUs];

    [self.tabController setViewControllers:arr animated:YES];

    [self resignFirstResponder];
    [self.view addSubview:self.tabController.view];
}

ただし、ios5 では動作が異なります。 iOS5

およびios6: iOS6

iOS5 および iOS6 の PFA スクリーンショット。iOS5とiOS6でまったく同じように見えるようにタブバーコントローラーを作成する方法は?

任意の助けが必要です。

4

0 に答える 0