if #available(iOS 13, *) {
let appearance = UITabBarAppearance()
appearance.stackedLayoutAppearance.selected.titleTextAttributes = [NSAttributedString.Key.foregroundColor:ColorUtil.main]
self.tabBarVC.tabBar.standardAppearance = appearance
}else{
let appearance = UITabBarItem.appearance()
appearance.setTitleTextAttributes([NSAttributedString.Key.foregroundColor:ColorUtil.main], for: .selected)
}
网友评论