Hello, I have been trying for some time to change the color of native UITabBar in UITabBarController through UITabBarAppearance, but nothing works and the text is still black in the Xcode Beta 3 on iPadOS 26 while it works correctly in the previous OS versions.
Here is the code:
let color = UIColor.white
let stackedAppearance = UITabBarItemAppearance()
stackedAppearance.normal.iconColor = color
stackedAppearance.normal.titleTextAttributes = [
.foregroundColor: color
]
stackedAppearance.selected.iconColor = color
stackedAppearance.selected.titleTextAttributes = [
.foregroundColor: color
]
let inlineAppearance = UITabBarItemAppearance()
inlineAppearance.normal.iconColor = color
inlineAppearance.normal.titleTextAttributes = [
.foregroundColor: color
]
inlineAppearance.selected.iconColor = color
inlineAppearance.selected.titleTextAttributes = [
.foregroundColor: color
]
let tabAppearance = UITabBarAppearance()
tabAppearance.compactInlineLayoutAppearance = inlineAppearance
tabAppearance.inlineLayoutAppearance = inlineAppearance
tabAppearance.stackedLayoutAppearance = stackedAppearance
UITabBar.appearance().standardAppearance = tabAppearance
UITabBar.appearance().scrollEdgeAppearance = tabAppearance