美文网首页
修改tabbar颜色 适配iOS13

修改tabbar颜色 适配iOS13

作者: 前年的邂逅_Jerry | 来源:发表于2020-07-03 11:38 被阅读0次
       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)
        }

相关文章

网友评论

      本文标题:修改tabbar颜色 适配iOS13

      本文链接:https://www.haomeiwen.com/subject/pzxsqktx.html