更改导航栏中的“后退"按钮的颜色 [英] Change color of Back button in navigation bar

查看:135
本文介绍了更改导航栏中的“后退"按钮的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将设置"按钮的颜色更改为白色,但无法更改.

I am trying to change the color of the Settings button to white, but can't get it to change.

我已经尝试了这两种方法:

I've tried both of these:

navigationItem.leftBarButtonItem?.tintColor = UIColor.whiteColor()
navigationItem.backBarButtonItem?.tintColor = UIColor.whiteColor()

但没有任何变化,仍然看起来像这样:

but no change, it still looks like this:

如何将按钮设为白色?

推荐答案

您可以通过在故事板上单击空白处并在右侧的工具栏显示文件检查器"中选择,来更改情节提要中的全局色调颜色,然后您将在工具栏的底部看到全局色调"选项.

You can change the global tint color in your storyboard by clicking on an empty space on the board and select in the right toolbar "Show the file inspector", and you will see in the bottom of the toolbar the "Global Tint" option.

这篇关于更改导航栏中的“后退"按钮的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆