iOS 7 tabBar-line, how to remove it?

前端 未结 12 1287
执笔经年
执笔经年 2021-01-31 07:52

Apple has added a tiny line over the tabBar in iOS 7 which is supposed to work as a shadow or fade between the tabBar and the UI

12条回答
  •  盖世英雄少女心
    2021-01-31 08:28

    These code works pretty well for me (I don't really have background image for tab bar):

    [tab_main.tabBar setBackgroundImage:[[UIImage alloc] init]];
    [[UITabBar appearance] setShadowImage:[[UIImage alloc] init]];
    

    And I use these code to add a frame too:

    UIColor* color_green = UIColorFromRGB(0x348e5b);
    tab_main.tabBar.layer.borderWidth = 0.50;
    tab_main.tabBar.layer.borderColor = color_green.CGColor;
    [[UITabBar appearance] setTintColor:color_green];
    

    Hope that helps.

提交回复
热议问题