Reputation: 51
How to remove the black line at the top of tab,
[self.tabBar setShadowImage:[UIImage new]];
self.tabBar.backgroundImage = [UIImage new];
iOS13
invalid
Upvotes: 1
Views: 162
Reputation: 20804
You need to use the new UITabBarAppareance
for iOS 13
if #available(iOS 13.0, *) {
let appareance = UITabBarAppearance(barAppearance: tabBarController.tabBar.standardAppearance)
appareance.shadowImage = nil
appareance.shadowColor = nil
tabBarController.tabBar.standardAppearance = appareance
} else {
// Fallback on earlier versions.
tabBarController.tabBar.shadowImage = UIImage()
}
Upvotes: 1