UITabBarItem icon not colored correctly for iOS 13 when a bar tint color is specified in Interface Builder in Xcode 11, beta 2
There is a new appearance API in iOS 13. To color tabbar item's icon and text correctly using Xcode 11.0 you can use it like this:
if #available(iOS 13, *) {
let appearance = UITabBarAppearance()
appearance.backgroundColor = .white
appearance.shadowImage = UIImage()
appearance.shadowColor = .white
appearance.stackedLayoutAppearance.normal.iconColor = .black
appearance.stackedLayoutAppearance.normal.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.black]
appearance.stackedLayoutAppearance.normal.badgeBackgroundColor = .blue
appearance.stackedLayoutAppearance.selected.iconColor = .red
appearance.stackedLayoutAppearance.selected.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.red]
self.tabBar.standardAppearance = appearance
}
On the surface, this might seem like a bug, however you can mitigate it by defining an .unselectedItemTintColor on your UITabBar instance.
self.tabBar.unselectedItemTintColor = [UIColor lightGrayColor];
Use the attribute field "Image Tint" in IB.