尝试在 iOS 15 中使用以下代码,但选项卡栏顶部的细线未删除,但以下代码适用于 iOS 13、iOS 14
let appearance = UITabBarAppearance()
appearance.shadowImage = nil
appearance.shadowColor = nil
appearance.backgroundEffect = nil
appearance.backgroundColor = UIColor.white
tabBar.standardAppearance = appearance
最佳答案
似乎在 iOS 15 上这可以消除阴影线
tabBar.standardAppearance.configureWithTransparentBackground()
tabBar.clipsToBounds = true
关于swift - iOS 15 中标签栏顶部的细线未删除,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70020353/