Skip to content

Fix iOS bottomTab textColor regression#8255

Open
yedidyak wants to merge 1 commit intomasterfrom
fix/8251-bottom-tab-text-colors-wt
Open

Fix iOS bottomTab textColor regression#8255
yedidyak wants to merge 1 commit intomasterfrom
fix/8251-bottom-tab-text-colors-wt

Conversation

@yedidyak
Copy link
Contributor

Summary

  • stop overwriting each tab item's full appearance when applying the shared tab bar appearance
  • keep the iOS 26 tab bar background fix introduced in 8.7.6
  • add a regression test proving bottomTab.textColor and bottomTab.selectedTextColor survive background updates

Why this broke

Issue #8251 started in the 8.7.5 -> 8.7.6 window, specifically in the iOS 26 bottom tab appearance refactor (ca3ead3866, #8245).

That change introduced applyTabBarAppearance: and began copying the shared UITabBarAppearance onto every UITabBarItem:

  • childViewController.tabBarItem.standardAppearance = [appearance copy];
  • childViewController.tabBarItem.scrollEdgeAppearance = [appearance copy];

Per-tab title colors are created earlier by BottomTabPresenter / RNNTabBarItemCreator on each item's own appearance objects. Replacing those objects later resets the title text attributes back to the default appearance, so bottomTab.textColor and bottomTab.selectedTextColor stop working while icon colors keep working.

Why this fix is safe

The regression is caused by replacing the item appearance objects, so the narrowest safe fix is to stop doing that and only apply the shared appearance to the UITabBar itself.

That preserves:

  • the 8.7.6/iOS 26 background handling on tabBar.standardAppearance and tabBar.scrollEdgeAppearance
  • each tab item's custom title attributes, which are intentionally item-specific
  • existing border handling, which still updates item appearance shadow images directly where needed

Testing

  • xcodebuild build-for-testing -scheme "playground" -workspace playground.xcworkspace -sdk iphonesimulator -configuration Debug -derivedDataPath ./DerivedData/playground -destination "platform=iOS Simulator,name=iPhone 16,OS=18.1" ONLY_ACTIVE_ARCH=YES
  • xcodebuild test-without-building -scheme "playground" -workspace playground.xcworkspace -sdk iphonesimulator -configuration Debug -derivedDataPath ./DerivedData/playground -destination "platform=iOS Simulator,name=iPhone 16,OS=18.1" -only-testing:NavigationTests/RNNBottomTabsAppearancePresenterTest ONLY_ACTIVE_ARCH=YES

Closes #8251.

@yedidyak yedidyak requested review from Copilot and markdevocht and removed request for Copilot March 19, 2026 16:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an iOS bottom tabs regression where per-tab title colors (bottomTab.textColor / bottomTab.selectedTextColor) were lost after updating the tab bar background appearance. The fix aligns BottomTabsAppearancePresenter behavior with the intended separation between shared UITabBar appearance and per-item UITabBarItem appearance.

Changes:

  • Stop copying the shared UITabBarAppearance onto each UITabBarItem, preventing per-tab title attributes from being overwritten.
  • Update the existing background-color test to assert against UITabBar.standardAppearance (the intended target of background updates).
  • Add a regression test ensuring per-tab title colors survive a background update (including scrollEdgeAppearance on iOS 15+).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
ios/BottomTabsAppearancePresenter.mm Removes per-item appearance overwrites so bottomTab title colors are preserved when applying shared tab bar appearance.
playground/ios/NavigationTests/RNNBottomTabsAppearancePresenterTest.mm Updates background assertion to target the UITabBar and adds a regression test for preserving per-tab title colors across background updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS - RNN 8.7.6 - bottomTab - props selectedTextColor & textColor are not working anymore

2 participants