更改导航栏中的“后退"按钮的颜色

问题描述:

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

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.