From c52ec09119d6db87a9433484eaa0e786783c1fc1 Mon Sep 17 00:00:00 2001 From: CalebChen768 <72332844+CalebChen768@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:56:17 +0800 Subject: [PATCH] Icon Problem Fixed --- ios/MyAccountApp/Info.plist | 5 ++++- ios/Podfile | 2 ++ ios/Podfile.lock | 2 +- src/components/BottomTabNavigator.tsx | 9 +++++---- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ios/MyAccountApp/Info.plist b/ios/MyAccountApp/Info.plist index 8fa9e4e..7f48f14 100644 --- a/ios/MyAccountApp/Info.plist +++ b/ios/MyAccountApp/Info.plist @@ -10,6 +10,10 @@ $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) + UIAppFonts + + Ionicons.ttf + CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -26,7 +30,6 @@ NSAppTransportSecurity - NSAllowsArbitraryLoads NSAllowsLocalNetworking diff --git a/ios/Podfile b/ios/Podfile index f40226a..ef91bbb 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -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. diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 56fa8b8..4fea45b 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1403,6 +1403,6 @@ SPEC CHECKSUMS: SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: 805bf71192903b20fc14babe48080582fee65a80 -PODFILE CHECKSUM: 29407bd75db4abdbd07d3a8c1b06fc5c12f802b3 +PODFILE CHECKSUM: fbd48ab9bd2d7cd12f0450d3da23a3d3a87ccb0b COCOAPODS: 1.15.2 diff --git a/src/components/BottomTabNavigator.tsx b/src/components/BottomTabNavigator.tsx index 614207d..7c4b1cd 100644 --- a/src/components/BottomTabNavigator.tsx +++ b/src/components/BottomTabNavigator.tsx @@ -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 ; }, tabBarActiveTintColor: 'tomato',