I have been trying to set my UITabBar's tint color and background color for quite some time now and nothing seems to work. So far I have tried:
tabBarController?.tabBar.backgroundColor = UIColor.orangeColor()
tabBarController?.tabBar.barTintColor = UIColor.whiteColor()
as well as:
UITabBar.appearance().tintColor = UIColor.orangeColor()
Neither of these seemed to have any effect on my tab bar. I'd also like to mention that I have the VC embedded in a navigation controller for which the global tint color that I set works perfectly fine.
Swift 4+ version
Set tab bar background color with barTintColor:
And for tab bar tint color:
If you want to set tabbar's
tint and barTint color
implicitly then in yourAppdelegate.swift
,If you want to set tabbar's
tint and barTint color
for specific viewController then inViewController.swift
,