I know here are lots of answers but I can't find an easy and valid copy/paste answer for Swift 4.2/ Swift 5.1
tabBarController?.tabBar.tintColor = UIColor.red
tabBarController?.tabBar.unselectedItemTintColor = UIColor.green
Or use UITabBar.appearances()
instead of tabBarController?.tabBar
like this:
UITabBar.appearances().tintColor = UIColor.red
UITabBar.appearances().unselectedItemTintColor = UIColor.green
Images have to be UIImageRenderingModeAlwaysTemplate