From f48a3824443c7d0eb412961ef0d5029ab181e18a Mon Sep 17 00:00:00 2001 From: Thiago Brezinski Date: Fri, 15 May 2026 09:56:44 -0500 Subject: [PATCH] fix(iOS): janky tab switch between colored and uncolored tabs --- .changeset/stable-tab-tint.md | 5 +++++ apps/example/ios/Podfile.lock | 2 +- .../react-native-bottom-tabs/ios/TabViewImpl.swift | 13 +++++-------- 3 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 .changeset/stable-tab-tint.md diff --git a/.changeset/stable-tab-tint.md b/.changeset/stable-tab-tint.md new file mode 100644 index 0000000..50273c9 --- /dev/null +++ b/.changeset/stable-tab-tint.md @@ -0,0 +1,5 @@ +--- +'react-native-bottom-tabs': patch +--- + +Keep iOS tab transitions smooth when switching between tabs with and without active tint colors. diff --git a/apps/example/ios/Podfile.lock b/apps/example/ios/Podfile.lock index d0ab93b..a60ae65 100644 --- a/apps/example/ios/Podfile.lock +++ b/apps/example/ios/Podfile.lock @@ -2842,7 +2842,7 @@ SPEC CHECKSUMS: React-logger: a3cb5b29c32b8e447b5a96919340e89334062b48 React-Mapbuffer: 9d2434a42701d6144ca18f0ca1c4507808ca7696 React-microtasksnativemodule: 75b6604b667d297292345302cc5bfb6b6aeccc1b - react-native-bottom-tabs: 5b7b8ee99ea2f19a496cabe8f6ec322b4d86c28d + react-native-bottom-tabs: df48704fe0d3f7566ab63e2b77b47e40f74a9051 react-native-safe-area-context: c6e2edd1c1da07bdce287fa9d9e60c5f7b514616 React-NativeModulesApple: 879fbdc5dcff7136abceb7880fe8a2022a1bd7c3 React-oscompat: 93b5535ea7f7dff46aaee4f78309a70979bdde9d diff --git a/packages/react-native-bottom-tabs/ios/TabViewImpl.swift b/packages/react-native-bottom-tabs/ios/TabViewImpl.swift index 1ead445..29eb3bb 100644 --- a/packages/react-native-bottom-tabs/ios/TabViewImpl.swift +++ b/packages/react-native-bottom-tabs/ios/TabViewImpl.swift @@ -267,15 +267,12 @@ extension View { @ViewBuilder func tintColor(_ color: PlatformColor?) -> some View { - if let color { - let color = Color(color) - if #available(iOS 16.0, tvOS 16.0, macOS 13.0, *) { - self.tint(color) - } else { - self.accentColor(color) - } + let color = color.map(Color.init) + + if #available(iOS 16.0, tvOS 16.0, macOS 13.0, *) { + self.tint(color) } else { - self + self.accentColor(color) } }