How to change the background color of the TabBar to translucence in iOS6

11,743

Solution 1

you can set transpertant image

UIImage* tabBarBackground = [UIImage imageNamed:@""];
[[UITabBar appearance] setBackgroundImage:tabBarBackground];
[[UITabBar appearance] setSelectionIndicatorImage:[UIImage imageNamed:@"trans.png"]];

check link

tab bar contrller

Solution 2

Have you tried the tint property with your custom color like

[[UITabBar appearance] setTintColor:[[UIColor alloc] initWithRed:0 green:0 blue:0 alpha:0.5]];

Solution 3

There are many way but in iOS7 by default

[tabBar setTranslucent:YES]; so you got translucence backGround of tabBar But in the iOS6 you do manually

[tabBar setTranslucent:YES];

Just try it and also try with @Retro's answer and another option is

[self.tabBarController.tabBar setBackgroundColor:[UIColor colorWithRed:0.0/255.0 green:0.0/255.0 blue:0.0/255.0 alpha:0.6]];
Share:
11,743
SubCycle
Author by

SubCycle

Updated on June 25, 2022

Comments

  • SubCycle
    SubCycle almost 2 years

    My UITabBarController is extend from UITabBarController, the background color is translucence in iOS7,but black in iOS6. How to change the background color to translucence in iOS6

  • Bhumesh Purohit
    Bhumesh Purohit over 6 years
    nice Help Without Transpernt I can't able to set uicolor