Remove Top Line from Tabbar

Remove top line from TabBar

removes the topline for @iOS 13.0

let appearance = tabBar.standardAppearance
appearance.shadowImage = nil
appearance.shadowColor = nil
tabBar.standardAppearance = appearance;

removes the topline for iOS 12.0 and earlier

tabBar.shadowImage = UIImage()
tabBar.backgroundImage = UIImage()

iOS UITabBar : Remove top shadow gradient line

Try setting a 1x1 pixel transparent shadow image for the UITabBar:

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

Remove UITabbar upper border line

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

or you can use

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

or

 [[UITabBar appearance] setShadowImage:nil];

How to remove Tab Bar top border (shadow) in iOS 10 and Swift 4 with a background image?

I just created a sample project using tab bar template from Xcode and write three lines of code

self.tabBar.layer.borderWidth = 0
self.tabBar.clipsToBounds = true
self.tabBar.backgroundColor = .blue

And tab bar top border is no longer visible. I've tested this on Simulator iphone 6 with ios 11.2

Sample Image

Remove the top border on TabView?

You have to set clipsToBounds to true on UITabBar.

HTML

<TabView (loaded)="onTabViewLoaded($event)">

TS

   onTabViewLoaded(event) {
if (event.object.ios) {
event.object.viewController.tabBar.clipsToBounds = true;
}
}


Related Topics



Leave a reply



Submit