gpt4 book ai didi

ios - 我的导航栏的色调会自动改变

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:34:33 25 4
gpt4 key购买 nike

我的导航栏上有一个自定义按钮,我使用 UINavigationBar.appearance().tintColor = UIColor.whiteColor()

更改了导航栏的色调

enter image description here

当这个按钮做出 Action 时,所有的导航条都变回蓝色

enter image description here

我该如何解决?

最佳答案

请把导航栏做成属性如下

Swift3.0代码:

self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.white]

关于ios - 我的导航栏的色调会自动改变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33702996/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com