.tint
and .accentColor
affect WAY more than just the tab bar and seep into toggles, navigation bar button items, sliders, etc and it seems like a giant pita to set every single component accent individually to avoid this. How can i change the selected item color without affecting any other components?
ive tried setting .foregroundColor
/.foregroundStyle
on the tab item views (doesnt work)
i also tried setting this in the init with no appreciable effect:
init {
let tabBarAppearance = UITabBarAppearance()
tabBarAppearance.configureWithDefaultBackground()
tabBarAppearance.stackedLayoutAppearance.selected.iconColor = UIColor.red
tabBarAppearance.stackedLayoutAppearance.selected.titleTextAttributes = [.foregroundColor: UIColor.red]
tabBarAppearance.stackedLayoutAppearance.normal.iconColor = UIColor.lightGray
tabBarAppearance.stackedLayoutAppearance.normal.titleTextAttributes = [.foregroundColor: UIColor.lightGray]
UITabBar.appearance().standardAppearance = tabBarAppearance
UITabBar.appearance().scrollEdgeAppearance = tabBarAppearance
}
id prefer not using a custom made tab bar in an overlay if possible, is there any way to achieve this in the native tab bar without changing the colors of any other component?