官术网_书友最值得收藏!

Navigation bar color

Last but not least is changing the color of the navigation bar. It's very rare to find an app that has a different color for the navigation bar in different screens. Most of the apps have one navigation color that is unique for all screens. We will now see how to set the navigation bar coloring globally in your app. Open the AppDelegate.swift file, and add these lines of code:

UINavigationBar.appearance().tintColor = UIColor.blackColor() 
UINavigationBar.appearance().barTintColor = UIColor.cyanColor()

We changed the default blue tint color to black color and bar tint color (background color) to cyan color. When you build and run, you should see something like this:

主站蜘蛛池模板: 德江县| 济宁市| 林周县| 临安市| 浦城县| 静安区| 闽清县| 合肥市| 海南省| 哈密市| 铁岭市| 琼海市| 定日县| 太谷县| 罗定市| 安岳县| 鹰潭市| 霸州市| 准格尔旗| 奉节县| 原平市| 昭觉县| 兴隆县| 满洲里市| 西贡区| 延长县| 马边| 德清县| 延长县| 扬州市| 响水县| 铜陵市| 昭平县| 凤庆县| 澄城县| 墨江| 鲁山县| 双桥区| 乐安县| 佛学| 读书|