Open
Conversation
There was a problem hiding this comment.
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
UITabBarAppearanceonto eachUITabBarItem, 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
scrollEdgeAppearanceon 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bottomTab.textColorandbottomTab.selectedTextColorsurvive background updatesWhy 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 sharedUITabBarAppearanceonto everyUITabBarItem:childViewController.tabBarItem.standardAppearance = [appearance copy];childViewController.tabBarItem.scrollEdgeAppearance = [appearance copy];Per-tab title colors are created earlier by
BottomTabPresenter/RNNTabBarItemCreatoron each item's own appearance objects. Replacing those objects later resets the title text attributes back to the default appearance, sobottomTab.textColorandbottomTab.selectedTextColorstop 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
UITabBaritself.That preserves:
tabBar.standardAppearanceandtabBar.scrollEdgeAppearanceTesting
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=YESxcodebuild 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=YESCloses #8251.