- iOS Programming Cookbook
- Hossam Ghareeb
- 109字
- 2021-07-09 18:29:49
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:
推薦閱讀
- Linux Mint Essentials
- 大學計算機應用基礎實踐教程(Windows 7+Office 2013)
- 精解Windows 8
- Haskell Financial Data Modeling and Predictive Analytics
- RESS Essentials
- 奔跑吧 Linux內核(入門篇)
- Windows 7中文版從入門到精通(修訂版)
- Android物聯網開發細致入門與最佳實踐
- NetDevOps入門與實踐
- Troubleshooting Docker
- HTML5 Enterprise Application Development
- Learning BeagleBone
- Less Web Development Essentials
- Gradle Effective Implementations Guide(Second Edition)
- Linux網絡操作系統項目教程(RHEL 6.4/CentOS 6.4)(第2版)