【发布时间】:2021-01-04 21:33:31
【问题描述】:
我正在以编程方式创建导航视图,我希望在深色模式下使用白色导航栏。我以为我做的一切都是正确的,但在黑暗模式下,我的导航栏仍然变暗
let navVC = UINavigationController(rootViewController: weatherMain)
navVC.navigationController?.navigationBar.tintColor = .white
navVC.navigationController?.navigationBar.backgroundColor = .white
navVC.modalPresentationStyle = .fullScreen
present(navVC, animated: true, completion: nil)
虽然有些答案建议使用 .backgroundColor 或 .tintColor,但它们对我一点帮助都没有。不知道怎么解决
【问题讨论】:
标签: swift uinavigationcontroller ios-darkmode