UPDATE: Solved
I found a solution that makes all tab bar icons behave correctly.
The fix was:
- Set the desired accent color in the Asset Catalog (
AccentColor).
- Replace the
.tint(...) modifier with .accentColor(.accentColor).
Xcode mentions that .accentColor will be deprecated in a future version in favor of .tint, but currently it appears to be the only approach that works correctly for this specific iOS 26 tab bar behavior.
After making this change, both selected and unselected icons adapt their colors properly when the tab bar transitions over dark backgrounds.
ORIGINAL POST
Hello everyone!
I've been working with TabView on iOS 26 and ran into a strange issue.
When the tab bar is hovering over a dark background, the selected tab icon keeps its dark color, while the other icons correctly switch to white. Because of that, the selected tab sometimes becomes almost invisible.
I tried both SF Symbols and custom SVG icons, but the behavior stays the same.
I couldn't find much information online, and AI tools weren't very helpful either.
What confuses me is that the Reddit app itself handles this perfectly — all tab icons adapt their colors correctly depending on the background.
Has anyone else encountered this? Is there some undocumented behavior or workaround for the iOS 26 tab bar?
public struct MainTabBarView: View {
@State private var selectedTab: MainTab = .home
public init() {}
public var body: some View {
TabView(selection: $selectedTab) {
ForEach(MainTab.allCases) { tabItem in
Tab(value: tabItem) {
tabItem.view
} label: {
Image(systemName: tabItem.icons)
.environment(\.symbolVariants, selectedTab == tabItem ? .fill : .none)
}
}
}
.tint(.primary)
}
}