iOS 15 swift tabbar顶部线条消失处理

方法1:
let appearance = UITabBarAppearance()
appearance.backgroundColor = UIColor.white
self.tabBar.standardAppearance = appearance
self.tabBar.scrollEdgeAppearance = appearance

方法2:
let appearance = UITabBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.backgroundColor = UIColor.white
tabBar.standardAppearance = appearance
tabBar.scrollEdgeAppearance = tabBar.standardAppearance

你可能感兴趣的:(iOS 15 swift tabbar顶部线条消失处理)