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
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
Rails: Redirect_To 'Myapp://' to Call iOS App from Mobile Safari
iOS Memory Usage Increasing, Can't Find the Culprit
Pfobject' Does Not Have a Member Named 'Subscript'
Recording from Remoteio: Resulting .Caf Is Pitch Shifted Slower + Distorted
Apple Watchkit Simulator Issue: Sperrorinvalidbundlenogizmobinarymessage
Swift: Load Images Async in Uitableviewcell
Duplicate Interface Definition for Class 'Gtmhttpuploadfetcher'
Xcode 4.2 Mainstoryboard Not Found
How to Get Nsdate with Millisecond Accuracy
iOS Calculate Text Height in Tableview Cell
iOS 8.3 and Later, Facebook Share Text Not Inserted
Google 400 Error: Invalid Request Custom Scheme Uris Are Not Allowed for 'Web' Client Type
Nsindexpath? Does Not Have a Member Name 'Row' Error in Swift
How to Add External Webvtt Subtitles into Http Live Stream on iOS Client
How to Change Device Orientation Programmatically in Swift
How to Monitor Battery Level and State Changes Using Swift