마모리(My Memory) 프로젝트
[react-native] vector-icons 사용, 설치 방법
huipark
2023. 7. 13. 18:32
github
https://github.com/oblador/react-native-vector-icons
설치
$ npm install --save react-native-vector-icons
라이브러리 연결
아래부터는 쉬운 방법이라는데 나는 해봤는데 안된다.... 아이콘 하나 설치하기 힘들다...
그래도 해보실 분들은
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
...
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIAppFonts</key>
<array>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>Octicons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Zocial.ttf</string>
<string>Fontisto.ttf</string>
</array>
</dict>
ios/projectName/info.plist
하단에 위의 코드를 붙여넣고
xcode에서
$ cmd + shift + K
를 눌러 Clean Build Folder를 해주고 새로 빌드 해주면 설치 끝
새로운 라이브러리 연결 방법
그리고 마지막으로!
$ cmd + shift + K
클린 빌드 하고 다시 빌드하면
드디어 나온다