使用react-native-vector-icons(RN0.6+)

前端开发 作者: 2024-08-26 08:35:01
1.安装 npm install --save react-native-vector-icons or yarn add react-native-vector-icons 2.配置 2.1.IOS
npm install --save react-native-vector-icons
or 
yarn add react-native-vector-icons
<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>MaterialIcons.ttf</string>
  <string>MaterialCommunityIcons.ttf</string>
  <string>SimpleLineIcons.ttf</string>
  <string>Octicons.ttf</string>
  <string>Zocial.ttf</string>
  <string>Fontisto.ttf</string>
</array>
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';

<FontAwesome5
    name={'microphone'}
    size={30}
 />
原创声明
本站部分文章基于互联网的整理,我们会把真正“有用/优质”的文章整理提供给各位开发者。本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
本文链接:http://www.jiecseo.com/news/show_68876.html