Icon Problem Fixed

This commit is contained in:
CalebChen768 2024-03-19 11:56:17 +08:00
parent 800ec5ead1
commit c52ec09119
4 changed files with 12 additions and 6 deletions

View File

@ -10,6 +10,10 @@
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>UIAppFonts</key>
<array>
<string>Ionicons.ttf</string>
</array>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
@ -26,7 +30,6 @@
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>

View File

@ -28,6 +28,8 @@ end
target 'MyAccountApp' do
config = use_native_modules!
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
use_react_native!(
:path => config[:reactNativePath],
# Enables Flipper.

View File

@ -1403,6 +1403,6 @@ SPEC CHECKSUMS:
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: 805bf71192903b20fc14babe48080582fee65a80
PODFILE CHECKSUM: 29407bd75db4abdbd07d3a8c1b06fc5c12f802b3
PODFILE CHECKSUM: fbd48ab9bd2d7cd12f0450d3da23a3d3a87ccb0b
COCOAPODS: 1.15.2

View File

@ -25,22 +25,23 @@ const BottomTabNavigator: React.FC = () => {
switch (route.name) {
case 'Overview':
iconName = focused ? 'ios-home' : 'ios-home-outline';
iconName = focused ? 'home' : 'home-outline';
break;
case 'Subscription':
iconName = focused ? 'ios-list' : 'ios-list-outline';
iconName = focused ? 'list' : 'list-outline';
break;
case 'Saving':
iconName = focused ? 'ios-wallet' : 'ios-wallet-outline';
iconName = focused ? 'wallet' : 'wallet-outline';
break;
case 'Profile':
iconName = focused ? 'ios-person' : 'ios-person-outline';
iconName = focused ? 'person' : 'person-outline';
break;
default:
iconName = 'ios-alert';
break;
}
console.log(iconName, size, color);
return <Icon name={iconName} size={size} color={color} />;
},
tabBarActiveTintColor: 'tomato',