我的tabBar在屏幕上显示不完整

时间:2013-09-11 18:06:15

标签: iphone ios uinavigationcontroller uitabbarcontroller

我的tabBar在我的应用程序的屏幕中显示不完整。我用这段代码创建了:

- (void) setupTabBar {

    YPProfileViewController *vc1 = [[YPProfileViewController alloc] init];
    vc1.title = @"FIRST";
    vc1.view.backgroundColor = [UIColor blueColor];

    YPProjectListViewController *vc2 = [[YPProjectListViewController alloc] init];
    vc2.title = @"SECOND";
    vc2.view.backgroundColor = [UIColor redColor];

    UITabBarController *tabBar = [[UITabBarController alloc] init];
    tabBar.viewControllers = @[vc1,vc2];
    tabBar.selectedIndex   = 1;

    [tabBar.view setAutoresizingMask:UIViewAutoresizingFlexibleHeight];
    [tabBar willMoveToParentViewController:self];
    [self addChildViewController:tabBar];
    [tabBar didMoveToParentViewController:self];
    [self.view addSubview:tabBar.view];

}

这是我的问题:TabBar is not getting resize

0 个答案:

没有答案