본문으로 건너뛰기

시작

벡터 아이콘을 빠르고 쉽게 사용할 수 있게 도와주는 라이브러리에요.

설치

yarn add react-native-vector-icons
yarn add --dev @types/react-native-vector-icons

iOS 설정

Info.plist 의 맨 마지막 </dict> 를 찾아 바로 위에 UIAppFonts 항목을 추가해주세요.

...

<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>

<key>UIAppFonts</key>
<array>
<string>MaterialIcons.ttf</string>
</array>

</dict>

그 후, 다시한번 pod install 후 빌드를 진행해주세요.

Android 설정

/app/build.gradle 파일을 수정해주세요.

project.ext.vectoricons = [
iconFontNames: ['MaterialIcons.ttf']
]

apply from '../../node_modules/react-native-vector-icons/fonts.gradle'