Camacho Camacho - 12 days ago 13
iOS Question

Remove top line from TabBar

On iOS 10 this code doesn't work in order to remove the tabBar shadow line:

[[UITabBar appearance] setShadowImage:[[UIImage alloc] init]];

Somebody knows what must I do to remove it?

On iOS 9.3 with this two lines the line is removed, but iOS 10 ignores


Just try to bellow code for iOS 10 :-

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    [[UITabBar appearance] setBackgroundImage:[UIImage imageNamed:@"fondoTabBar"]];
    [UITabBar appearance].layer.borderWidth = 0.0f;
    [UITabBar appearance].clipsToBounds = true;
    return YES;

Swift 3.x

UITabBar.appearance().layer.borderWidth = 0.0
UITabBar.appearance().clipsToBounds = true