Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove UITabbar upper border line

I have been using UITabbar in an app. There is an upper border line coming in top of the UITabbar. Refer below image :-

I Googled it and tried the suggested code like :-

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

Also

[[UITabBar appearance] setShadowImage:nil];

self.navigationController.toolbar.clipsToBounds = YES;

But none of them is working. Any solution?

enter image description here

like image 727
Awesome.Apple Avatar asked Sep 18 '15 06:09

Awesome.Apple


2 Answers

tabBar.clipsToBounds = YES; is work for me.

like image 140
Allen Avatar answered Oct 06 '22 21:10

Allen


[self.tabBar setValue:@(YES) forKeyPath:@"_hidesShadow"];

or you can use

[[UITabBar appearance] setShadowImage:[UIImage imageNamed:@"transparentShadow.png"]];

or

 [[UITabBar appearance] setShadowImage:nil];
like image 13
Usama Avatar answered Oct 06 '22 20:10

Usama