2014-01-09 40 views

回答

10

你可以设置transpertant图像

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

检查链接

tab bar contrller

+0

很好的帮助没有Transpernt我无法设置uicolor –

1

到半透明你有没有试着用你的自定义颜色的色调特性类似

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

Ther e为许多方式,但在iOS7默认

[tabBar setTranslucent:YES];所以你得到的TabBar的半透明背景,但在iOS6你做手工

[tabBar setTranslucent:YES]; 

只是尝试一下,也与@复古的答案,并另一种选择尝试是

[self.tabBarController.tabBar setBackgroundColor:[UIColor colorWithRed:0.0/255.0 green:0.0/255.0 blue:0.0/255.0 alpha:0.6]]; 
0

您可以设置如下。

[self.tabBarController.tabBar setBackgroundColor: 
[UIColor whiteColor]]; 
[self.tabBar setBackgroundColor:[UIColor whiteColor]]; 
[self.tabBarController.tabBar setTranslucent:NO]; 
[self.tabBar setTranslucent:NO]; 
相关问题