方法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
网友评论