如何在iOS6中将TabBar的背景颜色更改为半透明

Sub*_*cle 3 iphone objective-c ios ios6 ios7

UITabBarController 是延伸UITabBarController,背景颜色是半透明的iOS7,但在iOS6中是黑色的.如何将背景颜色更改为半透明iOS6

nit*_*iya 10

你可以设置transpertant图像

UIImage* tabBarBackground = [UIImage imageNamed:@""];
[[UITabBar appearance] setBackgroundImage:tabBarBackground];
[[UITabBar appearance] setSelectionIndicatorImage:[UIImage imageNamed:@"trans.png"]];
Run Code Online (Sandbox Code Playgroud)

检查链接

标签栏控制器