In the new iPadOS18+ elevated tab bar, no matter what i do, i cannot change the color of unselected icons… only the selected icon color reflects the UITabBarController view’s tintColor
no matter if
- setting the UITabBarAppearance for the stackedLayoutAppearance (or other appearances)
- setting in XCode interface builder (with or without custom appereance)
- setting the tabBar appearence directly
code
let tabBarAppearance = UITabBarAppearance()
tabBarAppearance.configureWithOpaqueBackground()
tabBarAppearance.backgroundColor = UIColor.green
tabBarAppearance.stackedLayoutAppearance.selected.titleTextAttributes = [.foregroundColor: UIColor.red]
tabBarAppearance.stackedLayoutAppearance.normal.titleTextAttributes = [.foregroundColor: UIColor.green]
tabBarAppearance.stackedLayoutAppearance.normal.iconColor = UIColor.green
tabBarAppearance.stackedLayoutAppearance.selected.iconColor = UIColor.red
UITabBar.appearance().scrollEdgeAppearance = tabBarAppearance
UITabBar.appearance().standardAppearance = tabBarAppearance
UITabBar.appearance().unselectedItemTintColor = .black
tabBar.scrollEdgeAppearance = tabBarAppearance
tabBar.standardAppearance = tabBarAppearance