swift 改变导航栏的颜色

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了swift 改变导航栏的颜色相关的知识,希望对你有一定的参考价值。


Using the Document Outline, select your Navigation Bar.
In the Attributes Inspector, in the Navigation Bar group, change the Style from Default to Black. This changes the background colour of the Navigation and Status bars to black, and their text to white. So the battery and other icons and text in the status bar will look white when the app is running.
In the same Navigation Bar group, change the Bar Tint to the colour of your liking.
If you have Bar Button items in your Navigation Bar, those will still show their text in the default blue colour, so in the Attributes Inspector, View group, change the Tint to White Colour.
That should get you what you want. Here is a screenshot that would make it easier to see where to make the changes.

Bar Tint: Background color of navigation bar
Title Color/Large Title color: color of title text in navigation bar
Tint: color of left and right button text in navigation bar

Source: https://stackoverflow.com/questions/18929864/how-to-change-navigation-bar-color-in-ios-7

以上是关于swift 改变导航栏的颜色的主要内容,如果未能解决你的问题,请参考以下文章

在 Swift 中更改导航栏颜色

改变导航栏的颜色

如何改变导航栏的颜色?

iOS滑动tableView来改变导航栏的颜色-1

如何更改特定视图上导航栏的颜色

更改导航栏的按钮颜色