Reputation: 21005
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
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
Upvotes: 0
Views: 28