NavigationBar和TabBar背景颜色始终为灰色

问题描述

我的TabBar和navigationBar始终是灰色的,尝试了我发现的所有StackOverflow解决方案,但均无效果。他们总是保持灰色。
这是我的AppDelegate代码,MenuViewControllerTabBarViewController

self.window = UIWindow(frame: UIScreen.main.bounds)
        
        let menuVC = MenuViewController()
        let navigationController = UINavigationController(rootViewController: menuVC)
        
        navigationController.navigationBar.tintColor = .white
        navigationController.navigationBar.barTintColor = .red
        
        window = UIWindow(frame: UIScreen.main.bounds)
        window?.rootViewController = UINavigationController(rootViewController: MainViewController())
        window?.makeKeyAndVisible()

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)