How to definitively set UITabBar background color and tint color
If you want to set tabbar's tint and barTint color
implicitly then in your Appdelegate.swift
,
UITabBar.appearance().barTintColor = .orange UITabBar.appearance().tintColor = .green
If you want to set tabbar's tint and barTint color
for specific viewController then in ViewController.swift
,
self.tabBarController?.tabBar.tintColor = .orange self.tabBarController?.tabBar.barTintColor = .green
Set tab bar background color with barTintColor:
self.tabBar.barTintColor = UIColor.blueColor()//orUITabBar.appearance().barTintColor = UIColor.blueColor()
And for tab bar tint color:
self.tabBar.tintColor = UIColor.whiteColor() // Selected tab color//orUITabBar.appearance().tintColor = UIColor.whiteColor()