如何删除标签顶部的黑线,
[self.tabBar setShadowImage:[UIImage new]];
self.tabBar.backgroundImage = [UIImage new];
iOS13
无效 最佳答案
您需要为iOS 13使用新的UITabBarAppareance
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()
}
关于ios - iOS13系统UITabBar,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/58282353/