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
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]];
Author by
SubCycle
Updated on June 25, 2022Comments
-
SubCycle almost 2 years
My
UITabBarController
is extend fromUITabBarController
, the background color is translucence iniOS7
,but black in iOS6. How to change the background color to translucence iniOS6
-
Bhumesh Purohit over 6 yearsnice Help Without Transpernt I can't able to set uicolor