From 052c421d523e16e932083b296fb3e8fb33254d43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?= Date: Wed, 27 Nov 2024 19:40:24 +0100 Subject: [PATCH 1/2] fix(ios): correctly handle active items for scroll edge transparent --- packages/react-native-bottom-tabs/ios/TabViewImpl.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/react-native-bottom-tabs/ios/TabViewImpl.swift b/packages/react-native-bottom-tabs/ios/TabViewImpl.swift index 36300aad..2b739282 100644 --- a/packages/react-native-bottom-tabs/ios/TabViewImpl.swift +++ b/packages/react-native-bottom-tabs/ios/TabViewImpl.swift @@ -195,9 +195,6 @@ private func createFontAttributes( ) -> [NSAttributedString.Key: Any] { var attributes: [NSAttributedString.Key: Any] = [:] - if let inactiveTintColor { - attributes[.foregroundColor] = inactiveTintColor - } if family != nil || weight != nil { attributes[.font] = RCTFont.update( @@ -258,12 +255,16 @@ private func configureStandardAppearance(tabBar: UITabBar, props: TabViewProps) let itemAppearance = UITabBarItemAppearance() let fontSize = props.fontSize != nil ? CGFloat(props.fontSize!) : tabBarDefaultFontSize - let attributes = createFontAttributes( + var attributes = createFontAttributes( size: fontSize, family: props.fontFamily, weight: props.fontWeight, inactiveTintColor: props.inactiveTintColor ) + + if let inactiveTintColor = props.inactiveTintColor { + attributes[.foregroundColor] = inactiveTintColor + } if let inactiveTintColor = props.inactiveTintColor { itemAppearance.normal.iconColor = inactiveTintColor From 453c50cd09ec4bb6faec006d82221a763036cf91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwa=C5=9Bniewski?= Date: Wed, 27 Nov 2024 19:42:32 +0100 Subject: [PATCH 2/2] Create modern-seas-pull.md --- .changeset/modern-seas-pull.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/modern-seas-pull.md diff --git a/.changeset/modern-seas-pull.md b/.changeset/modern-seas-pull.md new file mode 100644 index 00000000..bbae0218 --- /dev/null +++ b/.changeset/modern-seas-pull.md @@ -0,0 +1,5 @@ +--- +"react-native-bottom-tabs": patch +--- + +fix(ios): correctly handle active items for scroll edge transparent