tabBar背景颜色和高度调整

UITabBarController *mTabBar = [[UITabBarController alloc] init];

    mTabBar.tabBar.frame = CGRectMake(0, [UIScreen mainScreen].bounds.size.height -60, [UIScreen mainScreen].bounds.size.width, 60);

    self.tabBar.frame = mTabBar.tabBar.frame;

 

    UIView *backView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 60)];

    backView.backgroundColor = [UIColor colorWithHexString:@"#1f2227" withAlpha:1];

    

    [self.tabBar insertSubview:backView atIndex:0];

    self.tabBar.opaque = YES;

你可能感兴趣的:(tabBar背景颜色和高度调整)