ios - Set color for all UINavigationBars
问题描述
I have an app with multiple UINavigationControllers. Now I want to set their background color to the same color. I wrote this into the application method of AppDelegate:
UINavigationBar.appearance().backgroundColor = UIColor.darkGray
The same statement for UITabBars works:
UITabBar.appearance().barTintColor = UIColor.darkGray
What is my mistake?
Thanks for your help!
解决方案
UINavigationBar.appearance().barTintColor = UIColor.darkGray
一定是
推荐阅读
- tensorflow - TensorFlow GPU 利用率低
- bash - 编写脚本(或命令)
- java - 如何使用mybatis为db2中的每个select语句插入多行?
- symfony - Symfony - 如何小写表单字段?
- visual-studio-code - 无法解析远程端口 - 使用 ssh 的 vscode
- java - 使用 REST API 集成 Azure AD 以进行用户身份验证并将数据存储在用户的单一驱动器上
- ios - 如何在从上一个屏幕中选择的日期执行 +1 或 -1?
- php - 如果文件名中有空格,强制下载php返回okb
- javascript - Framework7 更改对话框按钮文本(例如用于翻译)
- android - android:使用 volley 传递具有相同参数名称的值数组