Search code examples
iosiphoneobjective-cios6ios7

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


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


Solution

  • 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