도래울

Changing navigation bar color in Swift 본문

개발/iOS

Changing navigation bar color in Swift

도래울 2016. 11. 9. 17:26

Navigation Bar:

navigationController.navigationBar.barTintColor = UIColor.greenColor()

Replace greenColor with whatever UIColor you want, you can use an RGB too if you prefer.

Navigation Bar Text:

navigationController.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.orangeColor()]

Replace orangeColor with whatever color you like.

Tab Bar:

tabBarController.tabBar.barTintColor = UIColor.brownColor()

Tab Bar Text:

tabBarController.tabBar.tintColor = UIColor.yellowColor()


Comments