When attempting to render a UITabBarController
with customized tint colour for chosen and unselected gadgets, I get right behaviour on model previous to iOS26. However on iOS26 tint is accurately utilized on chosen gadgets, however for unselected ones it is just utilized on the textual content not icon.
{
let tabBar = self.tabBar
if #obtainable(iOS 13.0, *) {
let look = UITabBarAppearance()
look.stackedLayoutAppearance.chosen.iconColor = .systemGreen
look.stackedLayoutAppearance.chosen.titleTextAttributes = [.foregroundColor: UIColor.systemGreen]
look.stackedLayoutAppearance.regular.iconColor = .systemRed
look.stackedLayoutAppearance.regular.titleTextAttributes = [.foregroundColor: UIColor.systemRed]
tabBar.standardAppearance = look
tabBar.scrollEdgeAppearance = look
} else {
tabBar.tintColor = .systemGreen
tabBar.unselectedItemTintColor = .systemRed
}
tabBar.gadgets?.forEach { merchandise in
merchandise.picture = merchandise.picture?.withRenderingMode(.alwaysTemplate)
merchandise.selectedImage = merchandise.selectedImage?.withRenderingMode(.alwaysTemplate)
}
}
What I get:
I’m anticipating colour for icon to be similar because the textual content incase of unselected tab merchandise as properly.