swift - UIImagePickerController Navigation Bar Tint Color not working with iOS 13
问题描述
I am presenting a modal controller which is a UIImagePickerController.
I am trying to change the UIImagePickerController
navigation bars' tint colour.
Prior to iOS13 this worked fine;
imagePickerController.navigationBar.tintColor = .red
I have also tried;
imagePickerController.navigationController?.navigationBar.tintColor = .red
but still no joy.
What can I try next?
解决方案
rmaddy 在评论中的解决方案解决了这个问题。
实施中AppDelegate
;
func configureGlobalUI() {
UINavigationBar.appearance().tintColor = .red
}
然后打电话didFinishLaunchingWithOptions
这适用于我tintColor
在所有navigationBar
外观上的要求。
推荐阅读
- sql-server - 如何使用 SSIS 导出平面文件
- image - 如何使用 MATLAB 提取图像元数据?
- keras - 具有 sigmoid 输出的二元分类中的类概率
- java - 你怎么知道来自不同数组列表的两个元素是否发生冲突?
- javascript - 从 id 中具有特定子字符串的 HTML 表中删除所有行 (tr)
- javascript - 如何让 Cropper.js 使用来自 URL 的图像
- java - 如何将 Node、Edge 和 Dijkstra 类正确链接到 Main 方法
- java - 带有形状体积和面积类的 Java 接口
- reactjs - Electron:使用上下文菜单粘贴字符串
- r - R将箱形图与条形图结合起来有效,但反之则不行